I want to use log4j without any configure file. What I wan to do is something as:
logger = (Logger) LogManager.getLogger(this.getClass());
Strin
With the latest version of log4j2
, all create the APIs like
PatternLayout.createLayout,
FileAppender.createAppender,
LoggerConfig.createLogger
have become deprecated, it's better to use a custom log ConfigurationFactory
along with ConfigurationBuilder
for defining the log configuration programmatically.