Well it is easy (actually not since you need to hack classpath so a default log/*.jar in it would help) but the point is making it nice by default. Le 30 juil. 2014 21:59, "Christopher Schultz" <ch...@christopherschultz.net> a écrit :
> Romain, > > On 7/30/14, 3:52 PM, Romain Manni-Bucau wrote: > > Actually i never said to use 2 lines. Just to not be that verbose for > > console (dev) logger. > > > > File layout should stay production compliant and onelineformatter is > good > > for me even if truncating classes/method can be welcomed > > I think if you want things to behave differently in development, then > you should alter your development environment to behave that way. > There's no need to change the stock Tomcat logger: it's easily replaced > (edit logging.properties), or, if you wish, use the existing logger and > massage your log files for viewing (e.g. sed/awk/cut). > > -chris > > > Le 30 juil. 2014 20:23, "Christopher Schultz" < > ch...@christopherschultz.net> > > a écrit : > > > >> Romain, > >> > >> On 7/28/14, 3:59 AM, Romain Manni-Bucau wrote: > >>> 2014-07-28 9:38 GMT+02:00 Rainer Jung <rainer.j...@kippdata.de>: > >>>> Am 27.07.2014 um 19:19 schrieb Romain Manni-Bucau: > >>>> > >>>>> Here is the one we use: > >>>>> > >>>>> > >> > http://svn.apache.org/repos/asf/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/log/SingleLineFormatter.java > >>>> > >>>> > >>>> Can you compare the infomration provided by that formatter withz the > >> info > >>>> provided by OneLineFormatter (Example line)? By a quick look at the > >> code, > >>>> OneLineFormatter doesn't seem to show much info. > >>>> > >>>> > >>> > >>> OneLineFormatter: > >>> > >>> 28-Jul-2014 09:56:25.516 INFO [localhost-startStop-1] > >>> org.apache.catalina.startup.HostConfig.deployWAR Deployment of web > >>> application archive /home/prod/hazelcast-tomcat/webapps/ROOT.war has > >>> finished in 3 283 ms > >>> > >>> SimpleLineFormatter: > >>> > >>> INFO - Deployment of web application archive > >>> /home/prod/hazelcast-tomcat/webapps/ROOT.war has finished in 3 283 ms > >>> > >>> > >>> Main difference is OneLineFormatter often overflow in console (font > >>> size 9pt, screen size: 17"), not SimpleLineFormatter -> very nice in > >>> dev > >> > >> I will be -1 to any change like you are suggesting. > >> > >> Word-wrapping is not something that a logger should do. When searching > >> for errors in a log file, I don't want to have to grep for something and > >> then go into the file to find out when it happened. The only thing that > >> should be on separate lines is the stack trace if it's being included. > >> > >> If you want to look at a log file with certain portions cropped to a > >> certain number of characters, use sed, awk, or cut. > >> > >> -chris > >> > >> > > > >