Just set the pattern as  %m%n

-----Original Message-----
From: Rajasekhar Dara [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 09, 2006 12:19 PM
To: ysuneelreddy
Cc: 'Log4J Users List'
Subject: Re: RE: How to ignore the class path in log file

Hi Suneel,

Thanks for your mail.
  
Hope u didn't understand my problem correctly.

Currently, I am getting my log file as 
DEBUG com.dcx.gsp.glt.puecompare.PueCompareLogHooks - DELETED ELEMENT VEHICLE L 
608 D

My client doesn't want this part DEBUG 
com.dcx.gsp.glt.puecompare.PueCompareLogHooks - 

He needs just the line like this
DELETED ELEMENT VEHICLE L 608 D

If we write the code like this

Properties l_oConfig = new Properties();
l_oConfig.put("log4j.rootLogger", "DEBUG, R1");
l_oConfig.put("log4j.appender.R1","org.apache.log4j.RollingFileAppender");
l_oConfig.put("log4j.appender.R1.file",destination);    
l_oConfig.put("log4j.appender.R1.layout","org.apache.log4j.PatternLayout");
l_oConfig.put("log4j.appender.R1.layout.ConversionPattern","%-5p %c - %m%n");
// Create a logger instance
l_oLogger = Logger.getLogger(p_oForClass);
PropertyConfigurator.configure(l_oConfig);

we will get this part,

DEBUG com.dcx.gsp.glt.puecompare.PueCompareLogHooks - 

How to modify the code to ignore the above line eventhough I use

l_oLogger.debug("DELETED ELEMENT VEHICLE L 608 D");

Please help me on this.

Regards,

Dara:)


On Wed, 09 Aug 2006 ysuneelreddy wrote :
>Hi
>Put the loge level priority more than debug like error,fatal...
>What is the error in classpath..
>Just mention the logxxx.jar in classpath that's enough...
>If u have any queries tell me...
>
>-----Original Message-----
> From: Rajasekhar Dara [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, August 09, 2006 3:19 PM
>To: log4j-user@logging.apache.org
>Subject: How to ignore the class path in log file
>
>Hello Log4J Users,
>
>I have an application, In that my log output is coming as follows
>DEBUG com.dcx.gsp.glt.puecompare.PueCompareLogHooks - DELETED ELEMENT
>VEHICLE L 608 D.
>But I should ignore the class path and log file should look like
>DELETED ELEMENT VEHICLE L 608 D
>
>How to ignore the printing of DEBUG and the classpath? How to set the log4j
>properties?
>
>Immediate help would be appreciated.
>
>Regards,
>
>Dara.
>
>Regards,
>
>Rajasekhar Dara
>Mindtree Consulting Pvt Ltd
>Bangalore
>Phone: 28605000 Ext: 2366
>Mobile: 9845400277
>


Regards,

Rajasekhar Dara
Sr. Software Engineer
HP Global Soft Ltd
Bangalore
Phone: 22051018 
Mobile: 9845400277

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to