aboutsummaryrefslogtreecommitdiff
path: root/website2/usageExamples/LogExample_post.jpage
blob: eab3b0467fd1fb069f932057a67e5eb9c6cef501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
public class LogExample {
	private static final java.util.logging.Logger log = java.util.logging.Logger.getLogger(LogExample.class.getName());
	
	public static void main(String... args) {
		log.error("Something's wrong here");
	}
}

public class LogExampleOther {
	private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExampleOther.class);
	
	public static void main(String... args) {
		log.error("Something else is wrong here");
	}
}

public class LogExampleCategory {
	private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog("CounterLog");

	public static void main(String... args) {
		log.error("Calling the 'CounterLog' with a message");
	}
}