You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Raghuveer <ra...@infotechsw.com> on 2007/12/27 06:09:38 UTC

How to Stop logging

Is there way to stop logging in the application..

 

This is my configuration of  log4j.properties

 

 

 

 

log4j.logger.com.testapp.test=debug, test

log4j.appender.test=org.apache.log4j.RollingFileAppender

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

log4j.appender.test.MaxFileSize=5000KB

log4j.appender.test.MaxBackupIndex=10

log4j.appender.test.layout=org.apache.log4j.PatternLayout

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n

 


RE: How to Stop logging

Posted by Raghuveer <ra...@infotechsw.com>.
Hi Malik,
This is not working for me.
2 Log files are created for struts and application..
Any other alternative..


-----Original Message-----
From: Malik, Pratibha [mailto:Pratibha.Malik@safenet-inc.com] 
Sent: Thursday, December 27, 2007 11:51 AM
To: Log4J Users List; raghuveerv@infotechsw.com
Subject: RE: How to Stop logging 

The way to stop logging is to set the threshold "OFF"

log4j.logger.com.testapp.test=OFF

-----Original Message-----
From: Sharma, Manu IN GGN SISL [mailto:manusharma@siemens.com] 
Sent: Thursday, December 27, 2007 11:41 AM
To: Log4J Users List; raghuveerv@infotechsw.com
Subject: RE: How to Stop logging 

Possible workaround : log4j.logger.com.testapp.test=fatal, test

Description : Write fatal instead of debug, it would only display
logging for fatal level and rest other will be automatically stopped.
This way you can minimized the amount of logging generated.

 

-----Original Message-----
From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
Sent: Thursday, December 27, 2007 10:40 AM
To: log4j-user@logging.apache.org
Subject: How to Stop logging 

 

Is there way to stop logging in the application..

 

 

 

This is my configuration of  log4j.properties

 

 

 

 

 

 

 

 

 

log4j.logger.com.testapp.test=debug, test

 

log4j.appender.test=org.apache.log4j.RollingFileAppender

 

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

 

log4j.appender.test.MaxFileSize=5000KB

 

log4j.appender.test.MaxBackupIndex=10

 

log4j.appender.test.layout=org.apache.log4j.PatternLayout

 

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n

 

 

 



 
 
Important notice:This e-mail and any attachment thereto contains
corporate proprietary information. If you have received it by mistake,
please notify us immediately by reply e-mail and delete this e-mail and
its attachments from your system. Thank You.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: How to Stop logging

Posted by Jacob Kjome <ho...@visi.com>.
So, exactly what problem are you having with "stopping logging"?  This is 
exactly what Log4j is designed to do; log by category in a hierarchical 
manner.

First, define logging for the root logger.  I usually set this to some 
relatively high level, such as WARN, so that extraneous logging performed by 
any given library logging debug or info statements is squashed.  However, I 
still want to see problems when they appear.  WARN fits the bill.

Next, if you want more logging from a particular hierarchy, define that and 
lower logging level as desired.  Because you are only lowering the level for 
your defined hierarchy, you won't get extraneous logging from libraries other 
than those matching your hierarchy (conventionally named by package).

This is all very basic stuff.  If you haven't yet read up on Log4j, please do 
so before posting questions here.  We're happy to help, but you should 
understand the basics before posting.  If you do understand the basics and 
have posed a more nuanced question than I have given it credit for, please 
accept my apologies and explain in more detail what you are driving at.

Jake

On Wed, 2 Jan 2008 13:16:21 +0530
  "Raghuveer" <ra...@infotechsw.com> wrote:
> Hello,
> I was thinking to explore for both requirements.
> If it is not possible to stop creation of log file, then at least I want to
> implement stopping logging related to struts.
> So there will be only application related logs.
> 
> 
> -----Original Message-----
>From: Jacob Kjome [mailto:hoju@visi.com] 
> Sent: Monday, December 31, 2007 4:35 AM
> To: Log4J Users List
> Subject: Re: How to Stop logging
> 
> 
> I'm not clear on the goal here?  Are you trying to avoid logging or avoid
> the file 
> creation in the first place?  There is no way I know of to prevent the file
> from 
> being created that is defined for the appender in the configuration.
> Preventing 
> logging from going to that file is a totally separate issue.  Please
> clarify.
> 
> Jake
> 
> Raghuveer wrote:
>>  
>> 
>> Instead of putting fatal and minimizing the logs .I tried as below from
>> other replies for this subject which is also not Working
>> 
>>  
>> 
>> The way to stop logging is to set the threshold "OFF"
>> 
>>  
>> 
>> log4j.logger.com.testapp.test=OFF
>> 
>>  
>> 
>>  
>> 
>>   _____  
>> 
>> From: Sharma, Manu IN GGN SISL [mailto:manusharma@siemens.com] 
>> Sent: Thursday, December 27, 2007 11:41 AM
>> To: Log4J Users List; raghuveerv@infotechsw.com
>> Subject: RE: How to Stop logging 
>> 
>>  
>> 
>> Possible workaround : log4j.logger.com.testapp.test=fatal, test
>> 
>> Description : Write fatal instead of debug, it would only display logging
>> for fatal level and rest other will be automatically stopped. This way you
>> can minimized the amount of logging generated.
>> 
>>  
>> 
>> -----Original Message-----
>> From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
>> Sent: Thursday, December 27, 2007 10:40 AM
>> To: log4j-user@logging.apache.org
>> Subject: How to Stop logging 
>> 
>>  
>> 
>> Is there way to stop logging in the application..
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> This is my configuration of  log4j.properties
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> log4j.logger.com.testapp.test=debug, test
>> 
>>  
>> 
>> log4j.appender.test=org.apache.log4j.RollingFileAppender
>> 
>>  
>> 
>> log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log
>> 
>>  
>> 
>> log4j.appender.test.MaxFileSize=5000KB
>> 
>>  
>> 
>> log4j.appender.test.MaxBackupIndex=10
>> 
>>  
>> 
>> log4j.appender.test.layout=org.apache.log4j.PatternLayout
>> 
>>  
>> 
>> #log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> 
>> Important notice:This e-mail and any attachment thereto contains corporate
>> proprietary information. If you have received it by mistake, please notify
>> us immediately by reply e-mail and delete this e-mail and its attachments
>> from your system.
>> Thank You.
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: How to Stop logging

Posted by Raghuveer <ra...@infotechsw.com>.
Hello,
I was thinking to explore for both requirements.
If it is not possible to stop creation of log file, then at least I want to
implement stopping logging related to struts.
So there will be only application related logs.


-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com] 
Sent: Monday, December 31, 2007 4:35 AM
To: Log4J Users List
Subject: Re: How to Stop logging


I'm not clear on the goal here?  Are you trying to avoid logging or avoid
the file 
creation in the first place?  There is no way I know of to prevent the file
from 
being created that is defined for the appender in the configuration.
Preventing 
logging from going to that file is a totally separate issue.  Please
clarify.

Jake

Raghuveer wrote:
>  
> 
> Instead of putting fatal and minimizing the logs .I tried as below from
> other replies for this subject which is also not Working
> 
>  
> 
> The way to stop logging is to set the threshold "OFF"
> 
>  
> 
> log4j.logger.com.testapp.test=OFF
> 
>  
> 
>  
> 
>   _____  
> 
> From: Sharma, Manu IN GGN SISL [mailto:manusharma@siemens.com] 
> Sent: Thursday, December 27, 2007 11:41 AM
> To: Log4J Users List; raghuveerv@infotechsw.com
> Subject: RE: How to Stop logging 
> 
>  
> 
> Possible workaround : log4j.logger.com.testapp.test=fatal, test
> 
> Description : Write fatal instead of debug, it would only display logging
> for fatal level and rest other will be automatically stopped. This way you
> can minimized the amount of logging generated.
> 
>  
> 
> -----Original Message-----
> From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
> Sent: Thursday, December 27, 2007 10:40 AM
> To: log4j-user@logging.apache.org
> Subject: How to Stop logging 
> 
>  
> 
> Is there way to stop logging in the application..
> 
>  
> 
>  
> 
>  
> 
> This is my configuration of  log4j.properties
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> log4j.logger.com.testapp.test=debug, test
> 
>  
> 
> log4j.appender.test=org.apache.log4j.RollingFileAppender
> 
>  
> 
> log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log
> 
>  
> 
> log4j.appender.test.MaxFileSize=5000KB
> 
>  
> 
> log4j.appender.test.MaxBackupIndex=10
> 
>  
> 
> log4j.appender.test.layout=org.apache.log4j.PatternLayout
> 
>  
> 
> #log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n
> 
>  
> 
>  
> 
>  
> 
> 
> Important notice:This e-mail and any attachment thereto contains corporate
> proprietary information. If you have received it by mistake, please notify
> us immediately by reply e-mail and delete this e-mail and its attachments
> from your system.
> Thank You.
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: How to Stop logging

Posted by Jacob Kjome <ho...@visi.com>.
I'm not clear on the goal here?  Are you trying to avoid logging or avoid the file 
creation in the first place?  There is no way I know of to prevent the file from 
being created that is defined for the appender in the configuration.  Preventing 
logging from going to that file is a totally separate issue.  Please clarify.

Jake

Raghuveer wrote:
>  
> 
> Instead of putting fatal and minimizing the logs .I tried as below from
> other replies for this subject which is also not Working
> 
>  
> 
> The way to stop logging is to set the threshold "OFF"
> 
>  
> 
> log4j.logger.com.testapp.test=OFF
> 
>  
> 
>  
> 
>   _____  
> 
> From: Sharma, Manu IN GGN SISL [mailto:manusharma@siemens.com] 
> Sent: Thursday, December 27, 2007 11:41 AM
> To: Log4J Users List; raghuveerv@infotechsw.com
> Subject: RE: How to Stop logging 
> 
>  
> 
> Possible workaround : log4j.logger.com.testapp.test=fatal, test
> 
> Description : Write fatal instead of debug, it would only display logging
> for fatal level and rest other will be automatically stopped. This way you
> can minimized the amount of logging generated.
> 
>  
> 
> -----Original Message-----
> From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
> Sent: Thursday, December 27, 2007 10:40 AM
> To: log4j-user@logging.apache.org
> Subject: How to Stop logging 
> 
>  
> 
> Is there way to stop logging in the application..
> 
>  
> 
>  
> 
>  
> 
> This is my configuration of  log4j.properties
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
>  
> 
> log4j.logger.com.testapp.test=debug, test
> 
>  
> 
> log4j.appender.test=org.apache.log4j.RollingFileAppender
> 
>  
> 
> log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log
> 
>  
> 
> log4j.appender.test.MaxFileSize=5000KB
> 
>  
> 
> log4j.appender.test.MaxBackupIndex=10
> 
>  
> 
> log4j.appender.test.layout=org.apache.log4j.PatternLayout
> 
>  
> 
> #log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n
> 
>  
> 
>  
> 
>  
> 
> 
> Important notice:This e-mail and any attachment thereto contains corporate
> proprietary information. If you have received it by mistake, please notify
> us immediately by reply e-mail and delete this e-mail and its attachments
> from your system.
> Thank You.
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: How to Stop logging

Posted by Raghuveer <ra...@infotechsw.com>.
 

Instead of putting fatal and minimizing the logs .I tried as below from
other replies for this subject which is also not Working

 

The way to stop logging is to set the threshold "OFF"

 

log4j.logger.com.testapp.test=OFF

 

 

  _____  

From: Sharma, Manu IN GGN SISL [mailto:manusharma@siemens.com] 
Sent: Thursday, December 27, 2007 11:41 AM
To: Log4J Users List; raghuveerv@infotechsw.com
Subject: RE: How to Stop logging 

 

Possible workaround : log4j.logger.com.testapp.test=fatal, test

Description : Write fatal instead of debug, it would only display logging
for fatal level and rest other will be automatically stopped. This way you
can minimized the amount of logging generated.

 

-----Original Message-----
From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
Sent: Thursday, December 27, 2007 10:40 AM
To: log4j-user@logging.apache.org
Subject: How to Stop logging 

 

Is there way to stop logging in the application..

 

 

 

This is my configuration of  log4j.properties

 

 

 

 

 

 

 

 

 

log4j.logger.com.testapp.test=debug, test

 

log4j.appender.test=org.apache.log4j.RollingFileAppender

 

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

 

log4j.appender.test.MaxFileSize=5000KB

 

log4j.appender.test.MaxBackupIndex=10

 

log4j.appender.test.layout=org.apache.log4j.PatternLayout

 

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n

 

 

 


Important notice:This e-mail and any attachment thereto contains corporate
proprietary information. If you have received it by mistake, please notify
us immediately by reply e-mail and delete this e-mail and its attachments
from your system.
Thank You.


RE: How to Stop logging

Posted by "Malik, Pratibha" <Pr...@safenet-inc.com>.
Sorry...it should be

log4j.logger.com.testapp.test.threshold=OFF

-----Original Message-----
From: Malik, Pratibha [mailto:Pratibha.Malik@safenet-inc.com] 
Sent: Thursday, December 27, 2007 11:51 AM
To: Log4J Users List; raghuveerv@infotechsw.com
Subject: RE: How to Stop logging 

The way to stop logging is to set the threshold "OFF"

log4j.logger.com.testapp.test=OFF

-----Original Message-----
From: Sharma, Manu IN GGN SISL [mailto:manusharma@siemens.com] 
Sent: Thursday, December 27, 2007 11:41 AM
To: Log4J Users List; raghuveerv@infotechsw.com
Subject: RE: How to Stop logging 

Possible workaround : log4j.logger.com.testapp.test=fatal, test

Description : Write fatal instead of debug, it would only display
logging for fatal level and rest other will be automatically stopped.
This way you can minimized the amount of logging generated.

 

-----Original Message-----
From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
Sent: Thursday, December 27, 2007 10:40 AM
To: log4j-user@logging.apache.org
Subject: How to Stop logging 

 

Is there way to stop logging in the application..

 

 

 

This is my configuration of  log4j.properties

 

 

 

 

 

 

 

 

 

log4j.logger.com.testapp.test=debug, test

 

log4j.appender.test=org.apache.log4j.RollingFileAppender

 

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

 

log4j.appender.test.MaxFileSize=5000KB

 

log4j.appender.test.MaxBackupIndex=10

 

log4j.appender.test.layout=org.apache.log4j.PatternLayout

 

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n

 

 

 



 
 
Important notice:This e-mail and any attachment thereto contains
corporate proprietary information. If you have received it by mistake,
please notify us immediately by reply e-mail and delete this e-mail and
its attachments from your system. Thank You.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


The information contained in this electronic mail transmission may be
privileged and confidential, and therefore, protected from disclosure.
If you have received this communication in error, please notify us
immediately by replying to this message and deleting it from your
computer without copying or disclosing it.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: How to Stop logging

Posted by "Malik, Pratibha" <Pr...@safenet-inc.com>.
The way to stop logging is to set the threshold "OFF"

log4j.logger.com.testapp.test=OFF

-----Original Message-----
From: Sharma, Manu IN GGN SISL [mailto:manusharma@siemens.com] 
Sent: Thursday, December 27, 2007 11:41 AM
To: Log4J Users List; raghuveerv@infotechsw.com
Subject: RE: How to Stop logging 

Possible workaround : log4j.logger.com.testapp.test=fatal, test

Description : Write fatal instead of debug, it would only display
logging for fatal level and rest other will be automatically stopped.
This way you can minimized the amount of logging generated.

 

-----Original Message-----
From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
Sent: Thursday, December 27, 2007 10:40 AM
To: log4j-user@logging.apache.org
Subject: How to Stop logging 

 

Is there way to stop logging in the application..

 

 

 

This is my configuration of  log4j.properties

 

 

 

 

 

 

 

 

 

log4j.logger.com.testapp.test=debug, test

 

log4j.appender.test=org.apache.log4j.RollingFileAppender

 

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

 

log4j.appender.test.MaxFileSize=5000KB

 

log4j.appender.test.MaxBackupIndex=10

 

log4j.appender.test.layout=org.apache.log4j.PatternLayout

 

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n

 

 

 



 
 
Important notice:This e-mail and any attachment thereto contains
corporate proprietary information. If you have received it by mistake,
please notify us immediately by reply e-mail and delete this e-mail and
its attachments from your system. Thank You.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: How to Stop logging

Posted by "Sharma, Manu IN GGN SISL" <ma...@siemens.com>.
Possible workaround : log4j.logger.com.testapp.test=fatal, test

Description : Write fatal instead of debug, it would only display
logging for fatal level and rest other will be automatically stopped.
This way you can minimized the amount of logging generated.

 

-----Original Message-----
From: Raghuveer [mailto:raghuveerv@infotechsw.com] 
Sent: Thursday, December 27, 2007 10:40 AM
To: log4j-user@logging.apache.org
Subject: How to Stop logging 

 

Is there way to stop logging in the application..

 

 

 

This is my configuration of  log4j.properties

 

 

 

 

 

 

 

 

 

log4j.logger.com.testapp.test=debug, test

 

log4j.appender.test=org.apache.log4j.RollingFileAppender

 

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

 

log4j.appender.test.MaxFileSize=5000KB

 

log4j.appender.test.MaxBackupIndex=10

 

log4j.appender.test.layout=org.apache.log4j.PatternLayout

 

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n

 

 

 



 
 
Important notice:This e-mail and any attachment thereto contains corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank You.

Re: How to Stop logging

Posted by st...@gmail.com.
You guys are crazy, its 12:13am and issues are getting resolved. Keep up the good work.

Question for you, is it easy to configure mail alerts on specific conditions?

Thx,
Steve
Sent from my BlackBerry device on the Rogers Wireless Network

-----Original Message-----
From: "Raghuveer" <ra...@infotechsw.com>

Date: Thu, 27 Dec 2007 10:39:38 
To:<lo...@logging.apache.org>
Subject: How to Stop logging 


Is there way to stop logging in the application..

 

This is my configuration of  log4j.properties

 

 

 

 

log4j.logger.com.testapp.test=debug, test

log4j.appender.test=org.apache.log4j.RollingFileAppender

log4j.appender.test.File=\\\\logsserver\\APP_LOGS\\test\\test.log

log4j.appender.test.MaxFileSize=5000KB

log4j.appender.test.MaxBackupIndex=10

log4j.appender.test.layout=org.apache.log4j.PatternLayout

#log4j.appender.test.layout.ConversionPattern=%d~%p~%c~ %m%n

 





---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org