[Python-Dev] Change to logging Formatters: support for alternative format styles
Olemis Lang
olemis at gmail.com
Mon Nov 1 15:04:10 CET 2010
On Sun, Oct 31, 2010 at 9:55 AM, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> Olemis Lang <olemis <at> gmail.com> writes:
>>
>> On Fri, Oct 29, 2010 at 10:07 AM, Barry Warsaw <barry <at> python.org> wrote:
>> > I haven't played with it yet, but do you think it makes sense to add a
>> > 'style' keyword argument to basicConfig()? That would make it pretty easy
>> > to get the formatting style you want without having to explicitly
>> > instantiate a Formatter, at least for simple logging clients.
>> >
>>
>> Since this may be considered as a little sophisticated, I'd rather
>> prefer these new classes to be added to configuration sections using
>> fileConfig (and default behavior if missing), and still leave
>> `basicConfig` unchanged (i.e. *basic*) .
>>
>
> Actually it's no biggie to have an optional style argument for basicConfig.
> People who don't use it don't have to specify it; the style argument would only
> apply if format was specified.
>
ok
> For some people, use of {} over % is more about personal taste than about the
> actual usage of str.format's flexibility;
Thought you were talking about me, you only needed to say «he has
black hair and blue eyes» ... ;o)
> we may as well accommodate that
> preference, as it encourages in a small way the use of {}-formatting.
>
ok , nevermind , it's ok for me anyway (provided that sections for
`fileConfig` will be available) .
--
Regards,
Olemis.
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
Featured article:
More information about the Python-Dev
mailing list