Re: Conventions for Error Logging
- From: Tristan Van Berkom <tvb gnome org>
- To: אנטולי קרסנר <tombackton gmail com>
- Cc: gtk-list gnome org
- Subject: Re: Conventions for Error Logging
- Date: Sun, 5 May 2013 01:16:32 +0900
On Sat, May 4, 2013 at 10:22 PM, אנטולי קרסנר <tombackton gmail com> wrote:
Hello,
I'm writing a desktop application using Gnome technologies. I added
support for some operations which may fail or produce useful errors, so
I decided I want the app to record the warnings and errors in a log
file, allowing me to see the report later, and find bugs.
I tried to find any conventions for GNU software logging, and for Gnome
apps, but I found nothing.
Is there a convention for that? A standard location for log files in
filesystem/home directory? A common standard for naming them and filling
the contents?
System daemons would generally dump logs somewhere like:
$(localstatedir)/log/$(daemonname)/$(daemonname).log
Apps don't really log AFAIK, as they don't really have write permissions
to /var/log, instead I would think it more appropriate for the app launcher
(something integrated in the window manager, like a springboard) to direct
logging of an apps' stdout/stderr to some directory *it* controls (however
I don't know if WMs or gnome-shell actually do this, just think it would
be the 'right way').
If your app must write somewhere, it would be safe to write in XDG_CACHE_HOME
(g_get_user_cache_dir()).
Cheers,
-Tristan
And does Gnome have a log viewer app for reading log files produced by
applications?
Anatoly
_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]