diff options
Diffstat (limited to 'usage_examples/LogExample_post.jpage')
-rw-r--r-- | usage_examples/LogExample_post.jpage | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usage_examples/LogExample_post.jpage b/usage_examples/LogExample_post.jpage index cbdc5a9e..eab3b046 100644 --- a/usage_examples/LogExample_post.jpage +++ b/usage_examples/LogExample_post.jpage @@ -1,5 +1,5 @@ public class LogExample { - private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExample.class); + 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"); @@ -7,9 +7,17 @@ public class LogExample { } public class LogExampleOther { - private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(java.util.List.class); + private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExampleOther.class); public static void main(String... args) { - log.warn("Something might be wrong here"); + 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"); } } |