From ce8362fad53b0016dba9fb01fcb68ba2dd7ade36 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Tue, 21 Jan 2014 23:09:54 +0100 Subject: Added extra example to the online documentation for @Log --- usage_examples/LogExample_post.jpage | 10 +++++++++- usage_examples/LogExample_pre.jpage | 11 ++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'usage_examples') diff --git a/usage_examples/LogExample_post.jpage b/usage_examples/LogExample_post.jpage index 2ec7f223..4ab35b08 100644 --- a/usage_examples/LogExample_post.jpage +++ b/usage_examples/LogExample_post.jpage @@ -1,7 +1,15 @@ 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"); } } + +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"); + } +} diff --git a/usage_examples/LogExample_pre.jpage b/usage_examples/LogExample_pre.jpage index afabf369..196a9047 100644 --- a/usage_examples/LogExample_pre.jpage +++ b/usage_examples/LogExample_pre.jpage @@ -1,4 +1,5 @@ -import lombok.extern.slf4j.Log; +import lombok.extern.java.Log; +import lombok.extern.slf4j.Slf4j; @Log public class LogExample { @@ -7,3 +8,11 @@ public class LogExample { log.error("Something's wrong here"); } } + +@Slf4j +public class LogExampleOther { + + public static void main(String... args) { + log.error("Something else is wrong here"); + } +} -- cgit