[New-bugs-announce] [issue24193] Make LOGGING_FORMAT of assertLogs configurable

Berker Peksag report at bugs.python.org
Thu May 14 14:03:49 CEST 2015


New submission from Berker Peksag:

It would be useful if we could change the logging format of assertLogs when we use it:

    with self.assertLogs('foo', level='INFO', format='%(message)s') as cm:
        logging.getLogger('foo').info('first message')

    self.assertEqual(cm.output, ['first message'])

Or maybe with a class attribute like maxDiff:

    logFormat = '%(message)s'

----------
components: Library (Lib)
messages: 243182
nosy: berker.peksag, ezio.melotti, michael.foord, rbcollins
priority: normal
severity: normal
stage: needs patch
status: open
title: Make LOGGING_FORMAT of assertLogs configurable
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24193>
_______________________________________


More information about the New-bugs-announce mailing list