Re: A suggestion for an easy logger

2011-05-10 Thread TheSaint
Vinay Sajip wrote: > No, you can pass keyword arguments in any order - that's what makes > them keyword, as opposed to positional, arguments. I getting puzzled :) ==code== myself@laptop-~> python Python 3.2 (r32:88445, Apr 15 2011, 1

Re: A suggestion for an easy logger

2011-05-09 Thread Vinay Sajip
On May 9, 3:53 pm, TheSaint wrote: > Vinay Sajip wrote: > >logging.basicConfig(level=logging.DEBUG, format='%(message)s') > > logging.basicConfig(format='%(message)s', level=logging.DEBUG) > > I formulated in the reverse order of arguments, may that cause an > unpredicted result? No, you can pass

Re: A suggestion for an easy logger

2011-05-09 Thread TheSaint
Vinay Sajip wrote: > logging.basicConfig(level=logging.DEBUG, format='%(message)s') logging.basicConfig(format='%(message)s', level=logging.DEBUG) I formulated in the reverse order of arguments, may that cause an unpredicted result? The other points became clearer.. Once again Thank You --

Re: A suggestion for an easy logger

2011-05-08 Thread Vinay Sajip
On May 8, 12:21 pm, TheSaint wrote: > First I didn't espect to see much more than my message. I agree that I'm > very new to the module You could do logging.basicConfig(level=logging.DEBUG, format='%(message)s') to get just the message. > Second the will terminator appear only to real stdout

Re: A suggestion for an easy logger

2011-05-08 Thread TheSaint
Vinay Sajip wrote: 8< > For Python 3.2 and later, it's the terminator attribute of the > StreamHandler. See: 8< > Unfortunately, for earlier Python versions, you'd need to subclass and > override StreamHandler.emit() to get equivalent functionality :-( > I'm with 3.2 and willing to stay :) I was

Re: A suggestion for an easy logger

2011-05-08 Thread Vinay Sajip
On May 8, 7:15 am, TheSaint wrote: > OK, my analysis led me to the print() function, which would suffice for > initial my purposes. The logging HOWTO tells you when to use logging, warnings and print(): http://docs.python.org/howto/logging.html > Meanwhile I reading the tutorials, but I couldn

Re: A suggestion for an easy logger

2011-05-07 Thread TheSaint
TheSaint wrote: > I'd like to just have the 4 conditions mentioned in the first post. > OK, my analysis led me to the print() function, which would suffice for initial my purposes. Meanwhile I reading the tutorials, but I couldn't get how to make a formatter to suppress or keep the LF(CR) at th

Re: A suggestion for an easy logger

2011-05-07 Thread TheSaint
Vinay Sajip wrote: WoW :O , the creator !! > import logging > > logging.basicConfig(level=logging.DEBUG) I'm getting there, but the result it's not what I would. As far as I got to know, it should take to write a configuration file, which I still not aware of. I'd like to just have the 4 condi

Re: A suggestion for an easy logger

2011-05-07 Thread Vinay Sajip
On May 8, 1:00 am, mcilrain wrote: > Aside from the fact that it's very Javay, what's wrong with theloggingmodule? It's not especially Java-like. Since you can log using just import logging logging.basicConfig(level=logging.DEBUG) logging.debug('This is %sic, not %s-like - that's FUD', 'Python'

Re: A suggestion for an easy logger

2011-05-07 Thread mcilrain
Aside from the fact that it's very Javay, what's wrong with the logging module? -- http://mail.python.org/mailman/listinfo/python-list