Package lombok

Annotation Type CustomLog

public @interface CustomLog
Causes lombok to generate a logger field based on a custom logger implementation.

Complete documentation is found at the project lombok features page for lombok log annotations.


 public class LogExample {
With configuration:
will generate:
 public class LogExample {
     private static final log =;

Configuration must be provided in lombok.config, otherwise any usage of this annotation will result in a compile-time error. This annotation is valid for classes and enumerations.

See Also:
Log, CommonsLog, Log4j, Log4j2, Slf4j, XSlf4j, JBossLog, Flogger
  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    java.lang.String topic
    Sets a custom topic/category.
  • Element Details

    • topic

      java.lang.String topic
      Sets a custom topic/category. Note that this requires you to specify a parameter configuration for your custom logger that includes TOPIC.
      The topic/category of the constructed Logger. By default (or for the empty string as topic), the parameter configuration without TOPIC is invoked.