Summary: | Provide logging interface | ||
---|---|---|---|
Product: | Spice | Reporter: | David Jaša <jasa.david> |
Component: | spice-gtk | Assignee: | Spice Bug List <spice-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
David Jaša
2011-10-06 08:24:50 UTC
My opinion on this is that the lib shouldn't log itself in files. This doesn't seem like a good practice. Instead I suggest it uses "SPICE_DEBUG=1 spice-client | grep whatever we need | logger -t spice-client" to log to syslog. The wrapper script will be spice-xpi-client, provided with the client package. Yep, but the lib needs to provide logging data to the application if we want it to write to syslog or wherever :) This is what this bug is about since on IRC I wasn't sure if the spice gtk widget already provides this information or not. What do we want to log that is not in SPICE_DEBUG ? We could have SPICE_DEBUG levels to filter things, instead of grepping. Until now, I didn't see the need, but why not? until we have very good reason to log into files directly from the lib, I'll close this bug. (In reply to comment #4) > until we have very good reason to log into files directly from the lib, I'll > close this bug. As Christophe pointed out in #c2, this bug does _NOT_ request logging anywhere from the lib. It actually requests to leave the decision what to log and how to log to an author of actual client application and just provide infractructure that allows exactly that. the infrastucture for logging is provided by glib. They can redirect spice-gtk messages at their will. Anything I am missing? (In reply to comment #6) > the infrastucture for logging is provided by glib. > > They can redirect spice-gtk messages at their will. Anything I am missing? OK, so does that mean that app that uses spice-gtk can e.g. take message about insertion of smartcard that will be forwarded to user via libnotivy event but ignore everything else? If so, I'm fine with RESOLVED/FIXED. (If the feature is present but not reported/verified, then notabug is a kind of confusing, fixed would make a whole lot of more sense to me.) (In reply to comment #7) > OK, so does that mean that app that uses spice-gtk can e.g. take message about > insertion of smartcard that will be forwarded to user via libnotivy event but > ignore everything else? If so, I'm fine with RESOLVED/FIXED. Even better, there is a signal for that event: SpiceSmartcardManager::card-inserted. otherwise, it is a simple as having a log handler that filter messages like this: if (domain == "GSpice" && strstr (message, "smartcard: card-inserted")) log notify (domain, level, message) It would be interesting to introduce more domains, so that you don't need to filter by message, for example: GSpiceSmartcard, GSpiceDisplay, GSpiceAudio etc.. But I am not fond of this idea, since it wouldn't be terribly helpful (to understand what's going on, you'd need several domains), and will probably match the filename that you can already filter on. Furthermore, the amount of messages isn't that big, so it seems better to me to just log it all from GSpice. But if there is a need, we could do that. this is moved to GNOME / GLib https://bugzilla.gnome.org/show_bug.cgi?id=692979 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.