Doug Hellmann said on Wed, May 25, 2016 at 11:06:35AM -0400: > Excerpts from Alexis Lee's message of 2016-05-25 13:46:05 +0100: > > def some_method(ctx): > > log = tools.get_api_logger(ctx) or LOG > > That "or" statement in some_method() seems to imply though that > when spool logging is on, messages would *only* go through the > spooling logger. Is that what we want? Even for info messages?
The global logger (LOG) is still accessible so if you definitely want a message in the main log, you can use that instead. I'll use "reqlog" instead of "log" in future to make the two more quickly distinguishable. EG a "warning, disk running out of space" may be discovered during request processing but isn't tied to that request, so it makes more sense to send that to the main log. If we want a message to go to both loggers, without going to the global logger twice, we can do: if reqlog != LOG: reqlog.info("...") LOG.info("...") Alexis (lxsli) -- Nova developer, Hewlett-Packard Limited. Registered Office: Cain Road, Bracknell, Berkshire RG12 1HN. Registered Number: 00690597 England VAT number: GB 314 1496 79 __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev