Fixes issue 10329: Add optional ConsoleAppender to display logs in Eclipse
authorJuan Pablo Aroztegi <juanpablo.aroztegi@openbravo.com>
Mon, 24 Aug 2009 19:25:31 +0200
changeset 4822 00480773b8bf
parent 4821 a6f55577e4d6
child 4823 57eee24cc1be
child 5822 8d89761e56a3
Fixes issue 10329: Add optional ConsoleAppender to display logs in Eclipse
config/log4j.lcf.template
--- a/config/log4j.lcf.template	Sat Aug 22 14:52:32 2009 +0200
+++ b/config/log4j.lcf.template	Mon Aug 24 19:25:31 2009 +0200
@@ -9,12 +9,13 @@
 # * License for the specific  language  governing  rights  and  limitations
 # * under the License. 
 # * The Original Code is Openbravo ERP. 
-# * The Initial Developer of the Original Code is Openbravo SL 
-# * All portions are Copyright (C) 2007-2008 Openbravo SL 
+# * The Initial Developer of the Original Code is Openbravo SL
+# * All portions are Copyright (C) 2007-2009 Openbravo SL
 # * All Rights Reserved. 
 # * Contributor(s):  ______________________________________.
 # ************************************************************************
 
+# to enable logging in i.e. eclipse console add ", C" to the line below
 log4j.rootCategory=INFO, R, O1
 
 # Set our global levels
@@ -37,6 +38,11 @@
 # Keep one backup file
 log4j.appender.R.MaxBackupIndex=1
 
+# C is an optional ConsoleAppender for usage in i.e. Eclipse
+log4j.appender.C=org.apache.log4j.ConsoleAppender
+log4j.appender.C.layout=org.apache.log4j.PatternLayout
+log4j.appender.C.layout.ConversionPattern=%-4r [%t] %-5p %c - %m%n
+
 log4j.category.reloadXml=ERROR
 
 # To debug an specific class