Hi Peter.
Finally I got it. :)
That's it. It works. Thanks.
So, in each class, I will in init method execute:
self.logger = logging.getLogger()
and than everywhere use self.logger.debug('...') in order to produce the
message.
Best regards.
--
https://mail.python.org/mailman/listinfo/python-li
zljubi...@gmail.com 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
> 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?
import logging
LOG_LEVEL = logging.getLevelName('DEBUG')
On 26May2020 13:25, zljubi...@gmail.com wrote:
Furthermore, I must disable logging to stdout.
Normally logging does not happen to stdout. Do you have something which
does?
Cheers,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python-list
zljubi...@gmail.com wrote:
> Is this OK?
>
> 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
>
Furthermore, I must disable logging to stdout.
--
https://mail.python.org/mailman/listinfo/python-list
Is this OK?
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')
stderr = logging.StreamHandler()
stderr.termin
zljubi...@gmail.com wrote:
> Hi,
>
> I have a case in which I have to use custom function for logging.
> For example, all messages should go to stderr and end with '\r\n'.
>
> Can I somehow use standard python logging module but send all message to
> stderr with '\r\n' line endings?
Isn't that
On 26/05/20 8:26 AM, zljubi...@gmail.com wrote:
Hi,
I have a case in which I have to use custom function for logging.
For example, all messages should go to stderr and end with '\r\n'.
Can I somehow use standard python logging module but send all message to stderr
with '\r\n' line endings?