@Retention(value=SOURCE)
@Target(value=TYPE)
public @interface Slf4j
Complete documentation is found at the project lombok features page for lombok log annotations.
Example:
@Slf4j public class LogExample { }will generate:
public class LogExample { private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LogExample.class); }This annotation is valid for classes and enumerations.
org.slf4j.Logger
,
org.slf4j.LoggerFactory.getLogger(Class target)
,
@CommonsLog
,
@Log
,
@Log4j
,
@Log4j2
,
@XSlf4j
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
topic
Sets the category of the constructed Logger.
|
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.