Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-22 Thread Qiming Teng
On Thu, Jan 22, 2015 at 06:06:54AM -0500, Davanum Srinivas wrote: > Qiming, > > you are reading bits and pieces of my responses."if you checkout the > review" guess i give up! > > -- dims Ah, I see. I jumped directly into the code review dashboard without realizing that patch is still WIP. That

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-22 Thread Davanum Srinivas
Qiming, you are reading bits and pieces of my responses."if you checkout the review" guess i give up! -- dims On Wed, Jan 21, 2015 at 11:18 PM, Qiming Teng wrote: > On Wed, Jan 21, 2015 at 10:55:37AM -0500, Davanum Srinivas wrote: >> Qiming, >> >> Guessing you were looking at master. if you che

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Qiming Teng
On Wed, Jan 21, 2015 at 10:55:37AM -0500, Davanum Srinivas wrote: > Qiming, > > Guessing you were looking at master. if you checkout the review i > pointed to, you will see what others on the thread have pointed you > to: > https://github.com/openstack/oslo.log/blob/master/doc/source/usage.rst >

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Davanum Srinivas
Qiming, Guessing you were looking at master. if you checkout the review i pointed to, you will see what others on the thread have pointed you to: https://github.com/openstack/oslo.log/blob/master/doc/source/usage.rst We are using register_options and setup. we should be adding register_options in

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Qiming Teng
On Wed, Jan 21, 2015 at 08:25:57AM -0500, Davanum Srinivas wrote: > Qiming, > > Nova already uses oslo.config. there's a patch against nova to use > oslo_log. Doug took the effort to do this so we'd not face issues once > we release oslo_log, so yes, they have been tested together. Please > hop on

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Qiming Teng
On Wed, Jan 21, 2015 at 08:25:57AM -0500, Davanum Srinivas wrote: > Qiming, > > Nova already uses oslo.config. there's a patch against nova to use > oslo_log. Doug took the effort to do this so we'd not face issues once > we release oslo_log, so yes, they have been tested together. Please > hop on

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Mehdi Abaakouk
-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

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Davanum Srinivas
Qiming, Nova already uses oslo.config. there's a patch against nova to use oslo_log. Doug took the effort to do this so we'd not face issues once we release oslo_log, so yes, they have been tested together. Please hop onto #openstack-oslo to debug in real time. [1] https://review.openstack.org/#/

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Qiming Teng
On Wed, Jan 21, 2015 at 12:27:15PM +0200, Denis Makogon wrote: > On Wed, Jan 21, 2015 at 12:16 PM, Qiming Teng > wrote: > > > Hi, > > > > In the oslo_log 0.1.0 release, the setup() function demands for a conf > > parameter, but I have failed to find any hint about setting this up. > > > > The pro

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Qiming Teng
On Wed, Jan 21, 2015 at 12:27:15PM +0200, Denis Makogon wrote: > On Wed, Jan 21, 2015 at 12:16 PM, Qiming Teng > wrote: > > > Hi, > > > > In the oslo_log 0.1.0 release, the setup() function demands for a conf > > parameter, but I have failed to find any hint about setting this up. > > > > The pro

Re: [openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Denis Makogon
On Wed, Jan 21, 2015 at 12:16 PM, Qiming Teng wrote: > Hi, > > In the oslo_log 0.1.0 release, the setup() function demands for a conf > parameter, but I have failed to find any hint about setting this up. > > The problem is cfg.CONF() returns None, so the following code fails: > > conf = cfg.CO

[openstack-dev] oslo_log/oslo_config initialization

2015-01-21 Thread Qiming Teng
Hi, In the oslo_log 0.1.0 release, the setup() function demands for a conf parameter, but I have failed to find any hint about setting this up. The problem is cfg.CONF() returns None, so the following code fails: conf = cfg.CONF(name='prog', project='project') # conf is always None here, so