log4j.properties Simple question
log4j.logger.mylog = debug, A1
I want开发者_高级运维 to know 2 things,
- what is "mylog" here?
- what is "A" here?
mylog is the logger name (which you pass to Logger.getLogger() in your code; you can also pass a class in which case the logger name is the name of the class). In fact in a configuration file it can be the prefix for a logger name - so in this case, any logger name beginning with mylog will use appender A1 (and possibly others).
A1 is the appender name (which is configured elsewhere in the configuration file) - this determines where the actual output goes.
The "short introduction to log4j" is a good starting point for this sort of thing.
mylogis the name of your logger (as requested in your code usingLogger.getLogger("mylog").- A1 is the id of an appender that you defined in your configuration.
加载中,请稍侯......
精彩评论