What you are showing below is the output from the StatusLogger (log4j internal logging). It is not controlled by the logging configuration as all those logs are generated before and during configuration.
Ralph > On Aug 14, 2017, at 8:33 AM, Jochen Wiedmann <jochen.wiedm...@gmail.com> > wrote: > > Hi, > > my log4j2.xml specifies a pattern (%d{HH:mm:ss.SSS} %-5level [%t] %c - > %msg%n), which ought to include the category. However, my log file > looks like below. Am I missing something obvious here? > > Thanks, > > Jochen > > 2017-08-14 16:38:09,700 localhost-startStop-1 DEBUG PluginManager > 'Core' found 112 plugins > 2017-08-14 16:38:09,700 localhost-startStop-1 DEBUG PluginManager > 'Level' found 0 plugins > 2017-08-14 16:38:09,705 localhost-startStop-1 DEBUG PluginManager > 'Lookup' found 13 plugins > 2017-08-14 16:38:09,707 localhost-startStop-1 DEBUG Building > Plugin[name=layout, > class=org.apache.logging.log4j.core.layout.PatternLayout]. > 2017-08-14 16:38:09,723 localhost-startStop-1 TRACE > TypeConverterRegistry initializing. > 2017-08-14 16:38:09,723 localhost-startStop-1 DEBUG PluginManager > 'TypeConverter' found 26 plugins > 2017-08-14 16:38:09,745 localhost-startStop-1 DEBUG > PatternLayout$Builder(pattern="%d{HH:mm:ss.SSS} %-5level [%t] %c - > %msg%n", PatternSelector=null, > Configuration(C:\opt\apache-tomcat-8.5.20\lib\common\log4j2.xml), > Replace=null, charset="null", alwaysWriteExceptions="null", > disableAnsi="null", noConsoleNoAnsi="null", header="null", > footer="null") > 2017-08-14 16:38:09,746 localhost-startStop-1 DEBUG PluginManager > 'Converter' found 41 plugins > 2017-08-14 16:38:09,747 localhost-startStop-1 DEBUG Building > Plugin[name=appender, > class=org.apache.logging.log4j.core.appender.ConsoleAppender]. > 2017-08-14 16:38:09,761 localhost-startStop-1 DEBUG > ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", > direct="null", bufferedIo="null", bufferSize="null", > immediateFlush="null", ignoreExceptions="null", > PatternLayout(%d{HH:mm:ss.SSS} %-5level [%t] %c - %msg%n), > name="Console", > Configuration(C:\opt\apache-tomcat-8.5.20\lib\common\log4j2.xml), > Filter=null) > 2017-08-14 16:38:09,763 localhost-startStop-1 DEBUG Jansi is not > installed, cannot find org.fusesource.jansi.WindowsAnsiOutputStream > 2017-08-14 16:38:09,764 localhost-startStop-1 DEBUG Starting > OutputStreamManager SYSTEM_OUT.false.false > 2017-08-14 16:38:09,764 localhost-startStop-1 DEBUG Building > Plugin[name=appenders, > class=org.apache.logging.log4j.core.config.AppendersPlugin]. > 2017-08-14 16:38:09,767 localhost-startStop-1 DEBUG > createAppenders(={Console}) > 2017-08-14 16:38:09,767 localhost-startStop-1 DEBUG Building > Plugin[name=AppenderRef, > class=org.apache.logging.log4j.core.config.AppenderRef]. > 2017-08-14 16:38:09,774 localhost-startStop-1 DEBUG > createAppenderRef(ref="Console", level="null", Filter=null) > 2017-08-14 16:38:09,774 localhost-startStop-1 DEBUG Building > Plugin[name=root, > class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger]. > 2017-08-14 16:38:09,775 localhost-startStop-1 DEBUG > createLogger(additivity="null", level="TRACE", includeLocation="null", > ={Console}, ={}, > Configuration(C:\opt\apache-tomcat-8.5.20\lib\common\log4j2.xml), > Filter=null) > 2017-08-14 16:38:09,782 localhost-startStop-1 DEBUG Building > Plugin[name=loggers, > class=org.apache.logging.log4j.core.config.LoggersPlugin]. > 2017-08-14 16:38:09,784 localhost-startStop-1 DEBUG createLoggers(={root}) > 2017-08-14 16:38:09,785 localhost-startStop-1 DEBUG Configuration > XmlConfiguration[location=C:\opt\apache-tomcat-8.5.20\lib\common\log4j2.xml] > initialized > 2017-08-14 16:38:09,786 localhost-startStop-1 DEBUG Starting > configuration > XmlConfiguration[location=C:\opt\apache-tomcat-8.5.20\lib\common\log4j2.xml] > 2017-08-14 16:38:09,786 localhost-startStop-1 DEBUG Started > configuration > XmlConfiguration[location=C:\opt\apache-tomcat-8.5.20\lib\common\log4j2.xml] > OK. > 2017-08-14 16:38:09,787 localhost-startStop-1 TRACE Stopping > org.apache.logging.log4j.core.config.DefaultConfiguration@79a417b3... > 2017-08-14 16:38:09,787 localhost-startStop-1 TRACE > DefaultConfiguration notified 1 ReliabilityStrategies that config will > be stopped. > 2017-08-14 16:38:09,787 localhost-startStop-1 TRACE > DefaultConfiguration stopping root LoggerConfig. > 2017-08-14 16:38:09,788 localhost-startStop-1 TRACE > DefaultConfiguration notifying ReliabilityStrategies that appenders > will be stopped. > 2017-08-14 16:38:09,788 localhost-startStop-1 TRACE > DefaultConfiguration stopping remaining Appenders. > 2017-08-14 16:38:09,788 localhost-startStop-1 DEBUG Shutting down > OutputStreamManager SYSTEM_OUT.false.false-1 > 2017-08-14 16:38:09,789 localhost-startStop-1 DEBUG Shut down > OutputStreamManager SYSTEM_OUT.false.false-1, all resources released: > true > 2017-08-14 16:38:09,789 localhost-startStop-1 DEBUG Appender > DefaultConsole-1 stopped with status true > 2017-08-14 16:38:09,789 localhost-startStop-1 TRACE > DefaultConfiguration stopped 1 remaining Appenders. > 2017-08-14 16:38:09,790 localhost-startStop-1 TRACE > DefaultConfiguration cleaning Appenders from 1 LoggerConfigs. > 2017-08-14 16:38:09,790 localhost-startStop-1 DEBUG Stopped > org.apache.logging.log4j.core.config.DefaultConfiguration@79a417b3 OK > 2017-08-14 16:38:09,793 localhost-startStop-1 TRACE Reregistering > MBeans after reconfigure. > Selector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector@101cadc2 > 2017-08-14 16:38:09,793 localhost-startStop-1 TRACE Reregistering > context (1/1): '2562d363' > org.apache.logging.log4j.core.LoggerContext@4686002b > 2017-08-14 16:38:09,794 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching 'org.apache.logging.log4j2:type=2562d363' > 2017-08-14 16:38:09,794 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching > 'org.apache.logging.log4j2:type=2562d363,component=StatusLogger' > 2017-08-14 16:38:09,794 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching > 'org.apache.logging.log4j2:type=2562d363,component=ContextSelector' > 2017-08-14 16:38:09,795 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching > 'org.apache.logging.log4j2:type=2562d363,component=Loggers,name=*' > 2017-08-14 16:38:09,795 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching > 'org.apache.logging.log4j2:type=2562d363,component=Appenders,name=*' > 2017-08-14 16:38:09,796 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching > 'org.apache.logging.log4j2:type=2562d363,component=AsyncAppenders,name=*' > 2017-08-14 16:38:09,796 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching > 'org.apache.logging.log4j2:type=2562d363,component=AsyncLoggerRingBuffer' > 2017-08-14 16:38:09,797 localhost-startStop-1 TRACE Unregistering but > no MBeans found matching > 'org.apache.logging.log4j2:type=2562d363,component=Loggers,name=*,subtype=RingBuffer' > 2017-08-14 16:38:09,801 localhost-startStop-1 DEBUG Registering MBean > org.apache.logging.log4j2:type=2562d363 > 2017-08-14 16:38:09,806 localhost-startStop-1 DEBUG Registering MBean > org.apache.logging.log4j2:type=2562d363,component=StatusLogger > 2017-08-14 16:38:09,810 localhost-startStop-1 DEBUG Registering MBean > org.apache.logging.log4j2:type=2562d363,component=ContextSelector > 2017-08-14 16:38:09,814 localhost-startStop-1 DEBUG Registering MBean > org.apache.logging.log4j2:type=2562d363,component=Loggers,name= > 2017-08-14 16:38:09,817 localhost-startStop-1 DEBUG Registering MBean > org.apache.logging.log4j2:type=2562d363,component=Appenders,name=Console > 2017-08-14 16:38:09,824 localhost-startStop-1 TRACE Using default > SystemClock for timestamps. > 2017-08-14 16:38:09,825 localhost-startStop-1 TRACE Using > DummyNanoClock for nanosecond timestamps. > 2017-08-14 16:38:09,825 localhost-startStop-1 DEBUG Reconfiguration > complete for context[name=2562d363] at URI > C:\opt\apache-tomcat-8.5.20\lib\common\log4j2.xml > (org.apache.logging.log4j.core.LoggerContext@4686002b) with optional > ClassLoader: null > 2017-08-14 16:38:09,826 localhost-startStop-1 DEBUG Shutdown hook > enabled. Registering a new one. > 2017-08-14 16:38:09,828 localhost-startStop-1 DEBUG > LoggerContext[name=2562d363, > org.apache.logging.log4j.core.LoggerContext@4686002b] started OK. > 16:38:09.844 INFO [localhost-startStop-1] > web.demo.servlet.Initializer - Logging initialized from > file:/C:/opt/apache-tomcat-8.5.20/lib/common/web-demo/log4j2.xml > 2017-08-14 16:38:09,852 localhost-startStop-1 DEBUG > AsyncLogger.ThreadNameStrategy=CACHED > 2017-08-14 16:38:09,853 localhost-startStop-1 TRACE Using default > SystemClock for timestamps. > > -- > The next time you hear: "Don't reinvent the wheel!" > > http://www.keystonedevelopment.co.uk/wp-content/uploads/2014/10/evolution-of-the-wheel-300x85.jpg > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org