Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Menno Smits
On 3 September 2014 15:07, Menno Smits wrote: > > > Also, when we talk about package paths we really mean the source tree path > right? Every in cmd/juju is in the "main" package but uses a logger named > "juju.cmd.juju". We can really use the real package name to set the logger > name. > Urgh.

Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Menno Smits
On 3 September 2014 15:00, John Meinel wrote: > ... >> >> There were two ideas proposed: >> >> loggo.LoggerForPackage("juju") >> >> which would walk up the path until it found a path element juju, and >> construct the string that way. The other was do use a defined prefix: >> > > The only problem

Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread John Meinel
> > ... > There were two ideas proposed: > > loggo.LoggerForPackage("juju") > > which would walk up the path until it found a path element juju, and > construct the string that way. The other was do use a defined prefix: > The only problem here is that we have: github.com/juju/juju/juju and gi

Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Tim Penhey
On 02/09/14 23:07, David Cheney wrote: > Wow. I'm sorry I broke that, it didn't even occur to me. > > I wonder if there is a better way to handle this default case of "the > name of the logger follows the package path"), ie > > var logger = loggo.Logger("") // or something, it could be a new > me

Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread David Cheney
I'll take thumper's temperature for this feature at the standup and see what he thinks. On Wed, Sep 3, 2014 at 12:30 AM, Eric Snow wrote: > On Tue, Sep 2, 2014 at 5:07 AM, David Cheney > wrote: >> I wonder if there is a better way to handle this default case of "the >> name of the logger follow

Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread Eric Snow
On Tue, Sep 2, 2014 at 5:07 AM, David Cheney wrote: > I wonder if there is a better way to handle this default case of "the > name of the logger follows the package path"), ie > > var logger = loggo.Logger("") // or something, it could be a new > method, logger.Default(), or something. > > which w

Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread David Cheney
Wow. I'm sorry I broke that, it didn't even occur to me. I wonder if there is a better way to handle this default case of "the name of the logger follows the package path"), ie var logger = loggo.Logger("") // or something, it could be a new method, logger.Default(), or something. which will ins

Re: Logger prefixes for api/apiserver are changing

2014-09-02 Thread John Meinel
I just wanted to make sure that this makes it into the release notes, as it is a semi-user-visible change. John =:-> On Tue, Sep 2, 2014 at 2:00 PM, Dimiter Naydenov < dimiter.nayde...@canonical.com> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > As you may already know, t

Logger prefixes for api/apiserver are changing

2014-09-02 Thread Dimiter Naydenov
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, As you may already know, this pull request just landed today, moving state/api/ -> api/ and state/apiserver/ -> apiserver/ : https://github.com/juju/juju/pull/655 It didn't fix the logger prefixes in some places, which I'm fixing with this follow