mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 14:16:11 +00:00
Added extra example to the online documentation for @Log
This commit is contained in:
1 parent
d5c366e93e
commit
ce8362fad5
2 files changed
+19
-2
No files matched your search
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user