[openstack-dev] oslo_log/oslo_config initialization

Mehdi Abaakouk sileht at sileht.net
Wed Jan 21 13:27:42 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

Le 2015-01-21 11:16, Qiming Teng a écrit :
> Any hint or sample code to setup logging if I'm abandoning the log
> module from oslo.incubator?

You need to do:

   cfg.CONF(name='prog', project='project')
   log.setup(cfg.CONF, 'project')

Example of project that already use both: 
https://github.com/stackforge/gnocchi/blob/master/gnocchi/service.py#L25

Cheers,
- ---
Mehdi Abaakouk
mail: sileht at sileht.net
irc: sileht

-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v.1.20131017
Comment: http://openpgpjs.org

wkYEAREIABAFAlS/qU4JEJZbdE7sD8foAAAQQwCfYN9jFNWp4OsxJts7Elmy
8taVKfYAn1uDtfn0aEJVDzXXbLdACzVxXEsB
=lHLc
-----END PGP SIGNATURE-----




More information about the OpenStack-dev mailing list