Showing posts with label logging. Show all posts
Showing posts with label logging. Show all posts

Saturday, November 19, 2011

The journal - or system wide logging.

A couple of days ago I mentioned the idea of a session wide logging daemon.
Today the folks around systemd introduced "the journal", an improved logging approach for systemd based systems.

Friday, November 11, 2011

Session wide logging in GNOME.



Currently each application in GNOME is using GLib's logging functionality or something custom.
Errors written to stdout get logged in ~/.xsession-errors - and other places we don't know about.

What I would like, is to have a central place for application related logging. This could have many benefits:
  • Users have a single place to look out for errors applications didn't (yet) tell them about.
  • A logging daemon can keep a history and this could help solving bugs, e.g. it could be added to abrt reports.
  • Leads to less clutter in ~/.xsession-errors
If such a daemon is introduced, it should to be easy to integrate and be backwards compatible. In my eyes talking to this daemon can easily be realized by providing a GLogFunc, which handles the appropriate communication with the daemon. Additional features - like searching or exporting - could also be provided by the DBus interface, bt this is not important for logging itself.

And this is what I suggest:

slogd a simple logging daemon, providing a DBus interface to log messages.  This daemon also has an example backend which logs the messages into a sqlite database (via GDA).

libslogc a very tiny library to communicate with the daemon and slogc, a small tool wrapping libslogc. libslogc also provides slog_client_log (...), a GLogFunc to be used from C.

And there is finally simple.c, a small example on how to integrate libslogc. (Well, there ain't much to do.)

The code can be found at https://gitorious.org/valastuff/slog.
This is a prototype to get some feedback and see what other people think about a central logging daemon.