On 12/03/2010 02:36 PM, Thomas Mortagne wrote:
> On Fri, Dec 3, 2010 at 14:14, Florin Ciubotaru<[email protected]>  wrote:
>> +0.5
>>
>> The disadvantage is that it's harder to filter xwiki specific logs. Stdout
>> is usually more verbose and might also contains logs from other deployed
>> apps.
>
> Separate each app output in different files can and should be done by
> the application server.

Also, this is just a default. We could leave the xwiki.log logger 
configuration in log4j.properties, but commented out, which would mean 
that someone wanting to capture xwiki-only logs in a different file can 
do that easily.


+1 from me to this proposal as well.

>>
>> Florin Ciubotaru
>>
>> On Fri, Dec 3, 2010 at 11:32 AM, Vincent Massol<[email protected]>  wrote:
>>
>>> Hi devs,
>>>
>>> I'd like to propose removing the log to xwiki.log by default in our
>>> log4j.properties file.
>>>
>>> The rationale is:
>>> * This is causing problems with a lot of users since by default we log in
>>> the current directory and there are lots of cases when users start xwiki
>>> from a directory where you don't have correct permissions
>>> * We don't control where xwiki.log is created
>>>
>>> Proposal:
>>> * We only log to stdout:
>>> ** tomcat is already configured to capture stdout/stderr and to redirect
>>> them to catalina.out
>>> ** I have a modification ready for Jetty to do the same, here it is in case
>>> you want to see it:
>>>
>>>     <!-- =========================================================== -->
>>>     <!-- Redirect stdout&  stderr to a log file                      -->
>>>     <!-- =========================================================== -->
>>>     <New id="ServerLog" class="java.io.PrintStream">
>>>       <Arg>
>>>         <New class="org.mortbay.util.RolloverFileOutputStream">
>>>           <Arg><SystemProperty name="jetty.home"
>>> default="."/>/logs/yyyy_mm_dd.stderrout.log</Arg>
>>>           <Arg type="boolean">false</Arg>
>>>           <Arg type="int">90</Arg>
>>>           <Arg><Call class="java.util.TimeZone"
>>> name="getTimeZone"><Arg>GMT</Arg></Call></Arg>
>>>           <Get id="ServerLogName" name="datedFilename"/>
>>>         </New>
>>>       </Arg>
>>>     </New>
>>>     <Call class="org.mortbay.log.Log" name="info"><Arg>Redirecting
>>> stderr/stdout to<Ref id="ServerLogName"/></Arg></Call>
>>>     <Call class="java.lang.System" name="setErr"><Arg><Ref
>>> id="ServerLog"/></Arg></Call>
>>>     <Call class="java.lang.System" name="setOut"><Arg><Ref
>>> id="ServerLog"/></Arg></Call>
>>>
>>> WDYT?


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to