On Sat, May 4, 2013 at 12:16 PM, Tristan Van Berkom <tvb@xxxxxxxxx> wrote:
On Sat, May 4, 2013 at 10:22 PM, אנטולי קרסנר <tombackton@xxxxxxxxx> wrote:System daemons would generally dump logs somewhere like:
> 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?
$(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').
This is unrealistic, as apps themselves can launch other apps. Like, opening a file in nautilus or from Firefox will launch an app, and we don't want to add code to nautilus / Firefox to do the correct thing here.
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@xxxxxxxxx
> https://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list
--
Jasper
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list