This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Other Open Source Projects and the fly likes changing Log priority Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "changing Log priority" Watch "changing Log priority" New topic
Author

changing Log priority

palakolanusrinu Reddy
Greenhorn

Joined: Jan 03, 2008
Posts: 24
hi
can any one help in this

i'm using appender is
<appender name="CommsFileBySize"
class="org.apache.log4j.RollingFileAppender">
<errorHandler
class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
<param name="File"
value="${wsc.logs.home}/comms/comms.html"/>
<param name="Append" value="true" />
<param name="MaxFileSize" value="5KB" />
<param name="MaxBackupIndex" value="20" />
<layout class="com.csam.wsc.projects.ri.util.logging.layout.CsamHtmlLayout" />
</appender>

and category for this appender is

<category name="com.csam.wsc.enabling.comms.CommsLogger">
<priority value="INFO" />
<appender-ref ref="CommsFileBySize"/>
</category>
so
1) i'm changing priority value DEBUG to INFO but still its printing all DEBUG messages and ERROR messages how to print only INFO messages?

2) and i'm giving Max File Size is 5kb but some time file size is exceeding to 5kb how to restrict to 5 kb only?

its urgent can any one help in this

regards
Srinu
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: changing Log priority