[xwiki-devs] [Proposal] Remove logging to xwiki.log by default
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? Thanks -Vincent
Le 3 déc. 2010 à 10:32, Vincent Massol a écrit :
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: [...]
WDYT?
I'm +1. Where would that call be for jetty? My experience with Sun Java Application Server seems to also allow standard-out to be ok. A slight danger is that people (e.g. groovy page writers) use System.out or System.err which, in development conditions, cleanly goes to catalina.out but not in rolling-log conditions which starts to concretize when you are in slightly heavier production (then the system out is in the first output file... unless the logging infrastructure such as log4j does the change). I don't remember having seen a page describing "how to log from your xwiki page". paul
+1 On Fri, Dec 3, 2010 at 10:32, 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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1, JV. On Fri, Dec 3, 2010 at 10: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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 On Fri, Dec 3, 2010 at 10: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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 Thanks, Marius On 12/03/2010 11:32 AM, Vincent Massol 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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+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. 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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
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.
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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1 Denis On Fri, Dec 3, 2010 at 14:36, Thomas Mortagne <[email protected]>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.
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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO eGuilde sarl - CTO
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/
Should this go in 2.7 or should I wait for 3.0? IMO waiting for 3.0 (i.e. Monday for the release and the trunk branch) is best at this stage since we should be from now on only fix bugs for the 2.x cycle. Thanks -Vincent On Dec 3, 2010, at 10:32 AM, Vincent Massol 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?
Thanks -Vincent
On 12/03/2010 11:11 PM, Vincent Massol wrote:
Should this go in 2.7 or should I wait for 3.0?
IMO waiting for 3.0 (i.e. Monday for the release and the trunk branch) is best at this stage since we should be from now on only fix bugs for the 2.x cycle.
Technically, it is a bug. Practically, it changes XWiki in an important way. I'll leave the decision to you, but I'd be +0.1 in favor of 2.7.
Thanks -Vincent
On Dec 3, 2010, at 10:32 AM, Vincent Massol 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?
Thanks -Vincent
-- Sergiu Dumitriu http://purl.org/net/sergiu/
+1 to minimize the number of log files. Thanks, Anca On 3 déc. 2010, at 10:32, 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?
Thanks -Vincent _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (10)
-
Anca Luca -
Denis Gervalle -
Florin Ciubotaru -
Jean-Vincent Drean -
Jerome Velociter -
Marius Dumitru Florea -
Paul Libbrecht -
Sergiu Dumitriu -
Thomas Mortagne -
Vincent Massol