[New-bugs-announce] [issue39893] Add set_terminate() to logging

wyz23x2 report at bugs.python.org
Sat Mar 7 20:45:28 EST 2020


New submission from wyz23x2 <wyz23x2 at 163.com>:

Sometimes, we want to remove the ending \n and sometimes replace it wit something else, like print(). But logging doesn't support that.
I'd want a set_terminate() (Or set_end()) function that does that. I think it's easy. Just insert this at line 1119 of __init__ of 3.8.2:
def set_terminator(string='\n'):
    StreamHandler.terminator = string
Thanks!

----------
components: Library (Lib)
messages: 363622
nosy: wyz23x2
priority: normal
severity: normal
status: open
title: Add set_terminate() to logging
type: enhancement
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39893>
_______________________________________


More information about the New-bugs-announce mailing list