Use of @CustomLog

1,246 views
Skip to first unread message

FraScip

unread,
Oct 14, 2019, 8:03:27 AM10/14/19
to Project Lombok
Hi,
i'm using @CustomLog to avoid write code on custom log implemented using SLF4J

I have configured "lombok.config" with that line
lombok.log.custom.declaration=org.slf4j.Logger com.mii.commons.logger.LoggerFactory.getMIILoggerLogic(TYPE)

so i can use 
@CustomLog

to generate
private final static org.slf4j.Logger = com.mii.commons.logger.LoggerFactory.getMIILoggerLogic(CLASSNAME);

In my custom logger i have 4 different factory method, i'm not understand how to use @CustomLog to choice these different implementation

Example of "lombok.config"
lombok.log.custom.declaration=org.slf4j.Logger com.mii.commons.logger.LoggerFactory.getMIILoggerLogic(TYPE)
lombok
.log.custom.declaration=org.slf4j.Logger com.mii.commons.logger.LoggerFactory.getMIILoggerSystem(TYPE)
lombok
.log.custom.declaration=org.slf4j.Logger com.mii.commons.logger.LoggerFactory.getMIILoggerCommunication(TYPE)
lombok
.log.custom.declaration=org.slf4j.Logger com.mii.commons.logger.LoggerFactory.getMIILoggerConfiguration(TYPE)

and maybe use 4 different @CustomLog syntax

can someone help me?


Reinier Zwitserloot

unread,
Oct 18, 2019, 7:10:45 AM10/18/19
to Project Lombok
Lombok can only use one of those definitions, but you can have 1 config file for each package. I don't think there is any way to have 4 different custom log annotations for 4 different logger configs like this :(
Reply all
Reply to author
Forward
0 new messages