[Spice-devel] [spice-xpi 5/5] Add glib Windows logging

Christophe Fergeau cfergeau at redhat.com
Mon Mar 25 03:50:12 PDT 2013


On Sun, Mar 24, 2013 at 11:27:41PM +0100, Marc-André Lureau wrote:
> > +}
> > +
> > +static void glib_setup_logging(void)
> > +{
> > +#if defined(XP_WIN)
> > +    FILE *log_file;
> > +    gchar *log_filename;
> > +
> > +    if (!g_getenv("SPICE_XPI_LOG_TO_FILE"))
> > +        return;
> 
> Imho, it would be more convenient to set the variable to the name of the file.

I've considered that, but this means I'd have to sanitize the filename for
\, '..', and probably some other things I didn't think of. As this is just
a debugging help, I've chosen to go with a hardcoded filename which does
not need additional care. I can change that if you feel strongly about it.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130325/c0cfbaa6/attachment.pgp>


More information about the Spice-devel mailing list