mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-05 10:19:28 +00:00
Added extra example to the online documentation for @Log
This commit is contained in:
@@ -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