mercredi 30 juin 2021

Adding logger in enum is good or bad practice?

I am having the enum like below

@Slf4j
public enum Test {
SUBJECT;

public static Test getValue() {
log.info("performing test")

return SUBJECT;
}
}

Is adding log in enum is good practice or not?

Aucun commentaire:

Enregistrer un commentaire