Am 28.07.2014 um 09:59 schrieb Romain Manni-Bucau:
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


Main issue is logs are not redable with OneLineFormatter (nothing is
aligned etc) which is sad since because it is the console logger it is
the one used in dev.


Readability is somewhat subjective. For a production use you'd typically not
read a log file line by line from start to stop, but you are looking for
patterns and then start to read lines around matches. But in order to be
able to look for a pattern, context helps a lot. An important example is as
Konstantin already mentioned the logging thread name. You can correlate with
other logs and you can also untangle concurrent log events belonging to
different threads/requests.


I agree that's why having it in file logger is important but for
console I think we can improve it (in particular since console logger
is mainly the same as file logger with few less info so I consider it
as a dev logger more than a prod one).

OK, good thing: I myself would find it a good compromise to optimize the console handler by default on console use (dev), and the file handler on log file use (prod). That would mean they both need a different formatter (or formatter config is that is possible).

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to