Re: Confused about logger config from within Python (3)

2012-12-29 Thread Roy Smith
In article , Terry Reedy wrote: > On 12/29/2012 8:48 AM, Roy Smith wrote: > > In article <[email protected]>, > > Steven D'Aprano wrote: > > > >> In Python 3.2 and 3.3, the message about no handlers is not printed, > >> which is an interesting difference. (So

Re: Confused about logger config from within Python (3)

2012-12-29 Thread Terry Reedy
On 12/29/2012 8:48 AM, Roy Smith wrote: In article <[email protected]>, Steven D'Aprano wrote: In Python 3.2 and 3.3, the message about no handlers is not printed, which is an interesting difference. (Somebody who knows more about the logging package than I

Re: Confused about logger config from within Python (3)

2012-12-29 Thread Roy Smith
In article <[email protected]>, Steven D'Aprano wrote: > In Python 3.2 and 3.3, the message about no handlers is not printed, > which is an interesting difference. (Somebody who knows more about the > logging package than I do might be able to state why that d

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 16:41:20 -0800, andrew cooke wrote: > similarly, if i run the following, i see only "done": > > from logging import DEBUG, root, getLogger > > if __name__ == '__main__': > root.setLevel(DEBUG) > getLogger(__name__).debug("hello world") > print('done')

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Steven D'Aprano
On Fri, 28 Dec 2012 11:57:29 -0800, andrew cooke wrote: > When I use a config file things seem to work (in other projects), but > for my current code I hoped to configure logging from Python. > > I distilled my problem down to the following test, which does not print > anything. Please can someo

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Dave Angel
On 12/28/2012 09:29 PM, andrew cooke wrote: > On Friday, 28 December 2012 21:56:46 UTC-3, Peter Otten wrote: > > reading the damn docs you condescending *? > You've made four posts this year to this forum, in two threads, to ask for help. In that same year, Peter Otten has voluntarily helpe

Re: Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
On Friday, 28 December 2012 21:56:46 UTC-3, Peter Otten wrote: > Other revolutionary ideas: read the docs > > ;) how do you think i knew about the root handler without reading the damn docs you condescending asshole? anywa

Re: Confused about logger config from within Python (3)

2012-12-28 Thread Peter Otten
andrew cooke wrote: > similarly, if i run the following, i see only "done": > > from logging import DEBUG, root, getLogger > > if __name__ == '__main__': > root.setLevel(DEBUG) > getLogger(__name__).debug("hello world") > print('done') You need a handler. The easiest way t

Re: Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
similarly, if i run the following, i see only "done": from logging import DEBUG, root, getLogger if __name__ == '__main__': root.setLevel(DEBUG) getLogger(__name__).debug("hello world") print('done') -- http://mail.python.org/mailman/listinfo/python-list

Confused about logger config from within Python (3)

2012-12-28 Thread andrew cooke
When I use a config file things seem to work (in other projects), but for my current code I hoped to configure logging from Python. I distilled my problem down to the following test, which does not print anything. Please can someone explain why? I was expecting the module's logger to delegate