[email protected] wrote:
>> You create two stream handlers that both log to stderr -- one with
>> basicConfig() and one explicitly in your code. That's probably not what
>> you want.
>
> How can I just add terminator = '\r\n' to the code bellow?
> Where should I put it?
I already answered that in my first post in the thread.
Spoon-feeding below ;)
> import logging
>
> LOG_LEVEL = logging.getLevelName('DEBUG')
>
> logging.basicConfig(level=LOG_LEVEL,
> format='%(asctime)s %(levelname)s %(name)s
> %(funcName)-20s %(message)s', datefmt='%d.%m.%Y
> %H:%M:%S')
[handler] = logging.getLogger().handlers
handler.terminator = "\r\n"
> logging.info('Main script started')
--
https://mail.python.org/mailman/listinfo/python-list