← Back to team overview

elementary-dev-community team mailing list archive

Re: Granite Logger



I don't have the time to write a long mail atm, but in fact, you must call g_debug (or debug() in vala), g_warning, g_critical, etc... to log any informations using the Granite logger. It will just replace the default glib formatter, but you must use the same functions.


On 08/14/2011 08:26 AM, Avi Romanoff wrote:

I am in the process of giving Switchboard as much Granite love as I can before the imminent 1.0 launch. I believe the way logging works in Granite right now is pretty broken.

First off, the only logging function Logger actually provides is notification(), which does not even appear to print any message in my test. Obviously it should work, and I'll file a bug, but what about other log levels? Surely it would make just as much sense to have convenience functions for critical/fatal and debugging errors as well?

Additionally it seems to me that Logger being something of a singleton makes it massively annoying to log errors in different parts of an application, where access to the Logger object might not be available. Could/should the logging system be re-factored to accommodate this, or am I missing something?


Follow ups