[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog: Provide a default logger
Andrew Cooper writes ("Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog: Provide a default logger"): > You want something like: > > static xentoollog_logger_stdiostream stdio_logger = { > .vtable = { > .vmessage = stdiostream_vmessage, > .progress = stdiostream_progress, > .destroy = 0, /* no-one should destroy this */ > }, > .min_level = XTL_PROGRESS, > /* for other fields except .f, 0 is good */ > }; > > static void __attribute__((__constructor__)) init_stdio_logger(void) > { > stdio_logger.f = stderr; > } Blimey. Is that portable enough ? I can switch to that if we think so. It's certainly more pleasant. > Which will cause the library loader to DTRT, but not require you to link > against pthread (which is a latent bug here, as you didn't update the > SHDEPS). Oops, although in practice I think this is not going to make any difference on any supported platform. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |