FAQ  •  Register  •  Login

Log file Size

<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Sun Apr 19, 2015 9:24 am

Log file Size

I cannot seem to be able to vary the log file size. I have my own "standard" log4j.xml file as below - I set DEBUG mode on, excluding library details, and also set the log file size to 5000K (5MB):

  Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<!-- ===================================================================== -->
<!--                                                                       -->
<!--  Log4j Configuration                                                  -->
<!--                                                                       -->
<!-- ===================================================================== -->

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">

    <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
       <param name="Threshold" value="DEBUG"/>
       <param name="Append" value="true" />
      <param name="File" value="${serviio.home}/log/serviio.log" />
      <param name="MaxFileSize" value="5000KB" />
      <param name="MaxBackupIndex" value="5" />   
      <param name="Encoding" value="UTF-8" />   
      <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{1}] %m%n"/>
      </layout>
   </appender>
   
   <category name="org.serviio">
      <priority value="DEBUG"/>
   </category>

   <category name="org.serviio.library.local">
      <priority value="INFO"/>
   </category>

   <category name="org.serviio.library.online">
      <priority value="INFO"/>
   </category>

   <category name="org.serviio.library.dao">
      <priority value="INFO"/>
   </category>
     
   <category name="com.sun.syndication">
      <priority value="ERROR"/>
   </category>
   
   <category name="org.jaudiotagger">
      <priority value="ERROR"/>
   </category>
   
   <category name="org.restlet">
      <priority value="OFF"/>
   </category>
   
   <category name="LogService"> <!-- Restlet access log -->
      <priority value="OFF"/>
   </category>
   
   <category name="org.apache.jcs">
      <priority value="WARN"/>
   </category>
   
   <root>
      <priority value="INFO"/>
      <appender-ref ref="FILE"/>
   </root>   
   
</log4j:configuration>
The DEBUG settings work fine, but the log file size setting doesn't - it keeps growing indefinitely. I have compared it to the standard log4j.xml file that ships with Serviio, and cannot see what is wrong. Can anyone see what is wrong, or is it a bug?
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Apr 20, 2015 12:33 pm

Re: Log file Size

If this is on Windows, it's probably caused by the log file being used by both, the server and the console (the file is locked by these two processes). So if you exit the console, the server should be able to manage the log file correctly.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 40 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.