[rfc][icedtea-web] added support for linux system logging
Andrew Azores
aazores at redhat.com
Fri Jan 3 12:49:04 PST 2014
In IcedTeaPluginUtils.h, you have a string constant in a syslog call that references "itweb-config". Is this meant to be itweb-settings?
IcedTeaPluginUtilsTest.cc - your new lines seem to be using 4x spaces as indentation whereas the existing lines are using tabs.
'man logger' also says that the 'error' level is a deprecated synonym for 'err', so perhaps the UnixSystemLog should be passing 'user.err' to the ProcessBuilder instead.
Is the Process#waitFor() call here also needed? It's a rudimentary way to ensure that if UnixSystemLog#log() is called several times in succession that the logs always are written to disk in the order the calls occur, but do we really need this logging to be synchronous like this? I'm not opposed to it, just wondering if it's considered necessary.
Finally, is there no library at all we can use for this rather than using ProcessBuilder? I mean, this /works/, but it feels kind of hacky to have to do it this way.
Thanks,
Andrew A
----- Original Message -----
From: "Jiri Vanek" <jvanek at redhat.com>
To: "IcedTea Distro List" <distro-pkg-dev at openjdk.java.net>
Sent: Friday, January 3, 2014 7:25:31 AM
Subject: [rfc][icedtea-web] added support for linux system logging
I was long time thinking how to integrate this feature.
- it is platform specific
- java on its own have poor support for linux logging
- stdout/err is logged into /var/log/messages via /etc/gdm/Xsession on SOME machines
At the end I bet to new java console as main source of debug information for developers, and let the
syslog sleep for a while.
Finally I decided to add it - to syslog only most important error messages are incoming - mostly
fatal one, and information how to find more information is included. Also they are going here in
both terminal and gdm/Xsession run. It means that in gdm/Xsession the critical error is duplicated
but the manual one is better formatted,and contains the url to fill the bug. And terminal or systems
without gdm (or similar) are not lacking this output.
C part was pretty straightforward via syslog(3), but java part ? At the end i picked up most simple
solution forking new *logger* process on each line of multi-line message. As the system logger is
from java side called only once per run, then the performance impact should be none.
http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs will need to be updated accordingly
- mention itw*settings role
- mention individual settings ^
- mention usefulness of logs from console/stouts ....
- mention linux system log
- mention irc/mailing list/ bugzilla
Looking forward to have this in!
J.
More information about the distro-pkg-dev
mailing list