[rfc][icedtea-web] added support for linux system logging

Pavel Tisnovsky ptisnovs at redhat.com
Fri Jan 17 06:49:39 PST 2014

Hi Jiri,

this change looks correct, ok to push it to the head.

Thank you,

----- Jiri Vanek <jvanek at redhat.com> wrote:
> On 01/03/2014 09:49 PM, Andrew Azores wrote:
> > In IcedTeaPluginUtils.h, you have a string constant in a syslog call that references "itweb-config". Is this meant to be itweb-settings?
> Tahnx for check. This was included also in UnixSystemLog.java - fixed.
> >
> > IcedTeaPluginUtilsTest.cc - your new lines seem to be using 4x spaces as indentation whereas the existing lines are using tabs.
> I would not call it so strict, but yes. You are starting to have  sharp eye;) - fixed
> >
> > '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.
> hmhmh, ok - fixed
> >
> > 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.
> I see it differently. The waitFor is waiting for process logger to finish. When logger process 
> finish, then it mean that the data were just send to logger daemon. Not written to disk or somehow 
> other way  processed by daemon. So my "synchronization" is just ensuring sync on itw side, not in 
> global logging itself. (by otherwords, lines are mixed only with messages from different processes, 
> not from itw itself. Without waitFor individual lines of stack trace may land in wrong order.
> If the logger process is waiting with successful exit untill dameon not only recieve message, but 
> also untill it is proccessed, then this approach must be revisited.
> >
> > 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.
> Nope. It took me a long time to say final word here. And I could not believe it myself too. Few 
> logging libraries have the support for linux logging. But always those are BIG dependencies much 
> bigger then ITW itself. And the reputation of theirs linux logging backend were everything but not 
> good. "this is not working, this is not implemented" ....
> If you have any possible replacement, feel free to scratch my approach!!!
> Although I consider it on one one hand hackish too, on second hand I consider it as cleanest 
> approach at all :)
> >
> > Thanks,
> > Andrew A
> I have also changed PluginDebug to MESSADE_DEBUG it have much more sense. It is no error, just info 
> (/me jsut hope some tests do not depend on it)
> Thanx for double eye!
> >
> > ----- 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