Skip to content

Commit

Permalink
0000763: When logging to the console, log to system.err so that comma…
Browse files Browse the repository at this point in the history
…nd line utilities can redirect system.out to files
  • Loading branch information
chenson42 committed Aug 9, 2012
1 parent ef87c81 commit 4d92198
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ protected void configureLogging(CommandLine line) throws MalformedURLException {
fileAppender.activateOptions();
}

System.out.println(String.format("Log output will be written to %s",
System.err.println(String.format("Log output will be written to %s",
fileAppender.getFile()));
}
}
Expand Down
1 change: 1 addition & 0 deletions symmetric-server/src/main/deploy/conf/log4j-blank.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.err" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
Expand Down
1 change: 1 addition & 0 deletions symmetric-server/src/main/deploy/conf/log4j-debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</appender>

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.err" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%X{engineName}] - %c{1} - %m%n" />
</layout>
Expand Down
1 change: 1 addition & 0 deletions symmetric-server/src/main/deploy/conf/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</appender>

<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.err" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%X{engineName}] - %c{1} - %m%n" />
</layout>
Expand Down

0 comments on commit 4d92198

Please sign in to comment.