@Retention(value=SOURCE) @Target(value=TYPE) public @interface Log4j
Complete documentation is found at the project lombok features page for lombok log annotations.
Example:
@Log4j
public class LogExample {
}
will generate:
public class LogExample {
private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LogExample.class);
}
This annotation is valid for classes and enumerations.| Modifier and Type | Optional Element and Description |
|---|---|
AccessLevel |
access
Sets the access level of the generated log field.
|
String |
topic |
public abstract AccessLevel access
AccessLevel.PRIVATE.public abstract String topic
Copyright © 2025. All rights reserved.