java - What is an equivalent of LoggerRepository in log4j2 -
i want migrate log4j 1.x log4j2 read article:
http://logging.apache.org/log4j/2.x/manual/migration.html
in our application using loggerrepository:
logger.getrootlogger().getloggerrepository().getcurrentloggers();
what equivalent of piece of code in log4j2. because in article said can't access method don't mention how should replace it
if understand need correctly, can go via logmanager
loggercontext
's configuration , retrieve logger
s that:
loggercontext ctx = logmanager.getcontext(); configuration cfg = ctx.getconfiguration(); map<string, loggerconfig> loggers = cfg.getloggers();
Comments
Post a Comment