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
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.
No comments:
Post a Comment