Sure. I am running on Windows 7 Enterprise 64 bit. I am also using the 64 bit version of java 1.8 update 60. I have to use a 64 bit version of java because the driver that my code is communicating with is 64 bit. I am running Log4j version 2.1 and I attached my configuration file.
Thx Blaine -----Original Message----- From: Ralph Goers [mailto:ralph.go...@dslextreme.com] Sent: Friday, January 29, 2016 10:31 AM To: Log4J Users List Subject: Re: Standard Out stops working Can you provide more information on your configuration and OS? What Log4j 2 version are you using? Ralph > On Jan 29, 2016, at 8:19 AM, Blaine Bergeson (bbergeson) > <bberge...@micron.com> wrote: > > I have been using Log4j for a while now without any major problems but now I > am experiencing a strange problem. If I build a simple java app and run it > from the command line, as soon as I call Configurator.initialize standard out > stops working. I called the System.out.checkError method and indeed the > stream is in an error state. I added the following property > -Dorg.apache.logging.log4j.simplelog.StatusLogger.level=TRACE and then ran > again which produced the following output. I am not sure if any of the items > listed below is a problem or not. I am using the same log4j2.xml file I have > used in other projects. When I run the project inside NetBeans everything > runs fine. > > > > Thx Blaine
<?xml version="1.0" encoding="UTF-8"?> <!-- --> <configuration name="AP_Script_Tool" status="error"> <appenders> <!-- routing has to be used so I can key off of a system property value which is always available. If we try to use a ThreadContextMapFilter than it doesn't resolve the value in the map from other classes.--> <Routing name="STDOUT_Routing"> <Routes pattern="${sys:std_out}"> <Route key="screen"> <Console name="STDOUT"> <PatternLayout pattern="%d{yyyy-MMM-dd HH:mm:ss.SSS} %-6p [%t] %C{2} %M %m%n"/> </Console> </Route> <Route key="snapshot_start"> <RandomAccessFile name="SnapshotFile" fileName="${sys:logDir}/snapshot.log" append="false"> <PatternLayout> <header>${sys:app_title} ${sys:app_version} ${java:version} - ${java:vm} - ${java:os} - ${java:hw}${sys:newline}</header> <pattern>%d{yyyy-MMM-dd HH:mm:ss.SSS} %m%n</pattern> </PatternLayout> </RandomAccessFile> </Route> <Route key="snapshot"> <RandomAccessFile name="SnapshotFile" fileName="${sys:logDir}/snapshot.log" append="false"> <PatternLayout> <header>${sys:app_title} ${sys:app_version} ${java:version} - ${java:vm} - ${java:os} - ${java:hw}${sys:newline}</header> <pattern>%d{yyyy-MMM-dd HH:mm:ss.SSS} %-6p [%t] %C{2} %M %m%n</pattern> </PatternLayout> </RandomAccessFile> </Route> <Route key="snapshot_end"> <RandomAccessFile name="SnapshotFile" fileName="${sys:logDir}/snapshot.log" append="false"> <PatternLayout> <header>${sys:app_title} ${sys:app_version} ${java:version} - ${java:vm} - ${java:os} - ${java:hw}${sys:newline}</header> <pattern>%d{yyyy-MMM-dd HH:mm:ss.SSS} %m%n%n</pattern> </PatternLayout> </RandomAccessFile> </Route> </Routes> </Routing> <Routing name="Routing"> <Routes pattern="$${ctx:mode}"> <!-- since the Route attribute has no key defined, this route will be chosen as long as there is no other route has a key that matches the value of the pattern value above--> <Route> <RollingRandomAccessFile name="RollingRandomAccessFile" fileName="${sys:logDir}/${sys:logFilename}.log" filePattern="${sys:logDir}/${sys:logFilename}-%i.log"> <PatternLayout> <header>${sys:app_title} ${sys:app_version} ${java:version} - ${java:vm} - ${java:os} - ${java:hw}${sys:newline}</header> <pattern>%d{yyyy-MMM-dd HH:mm:ss.SSS} %-6p [%t] %C{2} %M %m%n</pattern> </PatternLayout> <Policies> <!--OnStartupTriggeringPolicy/--> <!--TimeBasedTriggeringPolicy/--> <SizeBasedTriggeringPolicy size="6 MB"/> </Policies> <DefaultRolloverStrategy min="1" max="3" fileindex="max" /> </RollingRandomAccessFile> </Route> </Routes> </Routing> <Async name="AsyncRollingRandomFile" includeLocation="true"> <AppenderRef ref="Routing"/> </Async> </appenders> <loggers> <Root level="info" includeLocation="true"> <AppenderRef ref="AsyncRollingRandomFile"/> <AppenderRef ref="STDOUT_Routing" level="trace"/> </Root> </loggers> </configuration>
--------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org