Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

changing Log priority

 
palakolanusrinu Reddy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic