ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1645740 - /ctakes/trunk/ctakes-core-res/src/main/resources/log4j.xml
Date Mon, 15 Dec 2014 20:33:13 GMT
Author: seanfinan
Date: Mon Dec 15 20:33:13 2014
New Revision: 1645740

URL: http://svn.apache.org/r1645740
Log:
Added two logger / appender types for simple dynamic logging of progress with log4j

Modified:
    ctakes/trunk/ctakes-core-res/src/main/resources/log4j.xml

Modified: ctakes/trunk/ctakes-core-res/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core-res/src/main/resources/log4j.xml?rev=1645740&r1=1645739&r2=1645740&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core-res/src/main/resources/log4j.xml (original)
+++ ctakes/trunk/ctakes-core-res/src/main/resources/log4j.xml Mon Dec 15 20:33:13 2014
@@ -33,9 +33,31 @@
 			<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n" />
 		</layout>
 	</appender>
-	<root>
-		<level value="INFO" />
-		<appender-ref ref="consoleAppender" />
+   <!-- noEolAppender  prints a message without prefix or newline -->
+   <appender name="noEolAppender" class="org.apache.log4j.ConsoleAppender">
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%m"/>
+      </layout>
+   </appender>
+   <!-- eolAppender  prints a message and newline without prefix -->
+   <appender name="eolAppender" class="org.apache.log4j.ConsoleAppender">
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%m%n"/>
+      </layout>
+   </appender>
+   <!-- ProgressAppender is useful for dynamically logging progress dots ... -->
+   <logger name="ProgressAppender" additivity="false">
+      <level value="INFO"/>
+      <appender-ref ref="noEolAppender"/>
+   </logger>
+   <!-- ProgressDone is useful for ending the dynamic logging of progress dots ... -->
+   <logger name="ProgressDone" additivity="false">
+      <level value="INFO"/>
+      <appender-ref ref="eolAppender"/>
+   </logger>
+   <root>
+      <level value="INFO"/>
+      <appender-ref ref="consoleAppender" />
 		<!--  <appender-ref ref="fileAppender" /> -->
 	</root>
 </log4j:configuration> 
\ No newline at end of file



Mime
View raw message