Added extra example to the online documentation for @Log

This commit is contained in:
Roel Spilker
2014-01-21 23:09:54 +01:00
parent d5c366e93e
commit ce8362fad5
2 changed files with 19 additions and 2 deletions
+9 -1
View File
@@ -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");
}
}
+10 -1
View File
@@ -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");
}
}