Re: Conventions for Error Logging
- From: אנטולי קרס נר <tombackton gmail com>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: gtk-list gnome org
- Subject: Re: Conventions for Error Logging
- Date: Sat, 04 May 2013 19:46:26 +0300
Thanks for your reply,
I realized app error logs are needed only for debugging, I guess that's
why release-build apps in general don't need to log anything. In debug
mode, I'm taking your advice to write to the standard home cache dir.
Anatoly
On א', 2013-05-05 at 01:16 +0900, Tristan Van Berkom wrote:
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]