Wykres commitów

15 Commity (eae01bd4e4cd1b22d9ccfedbd6bf9d879f64d9bd)

Autor SHA1 Wiadomość Data
Damien George eae01bd4e4 logging: Add "levelno" entry to log record object/dict.
Useful for custom handlers to do further level filtering.

Signed-off-by: Damien George <damien@micropython.org>
2020-09-03 11:29:36 +10:00
Damien George 7b1161dd1b logging: Add support for custom handlers.
Any custom handlers will be passed a LogRecord instance which has members
and a dict with "levelname", "message" and "name", to be used for creating
a log message.  The handler list is a global singleton so that sub-logging
objects all use the same set of (root) handlers.

The name of the root handler is also changed from None to "root", to match
CPython.

Signed-off-by: Damien George <damien@micropython.org>
2020-07-08 15:59:01 +10:00
Paul Sokolovsky b97fe09ed9 logging: Add exc() and exception() methods.
Non-standard exc() method accepts exception instance to log as a
parameter. exception() just uses sys.exc_info().
2018-05-11 14:18:02 +10:00
Paul Sokolovsky 09c59c4704 logging: Add setLevel() method. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 6b67e351f0 logging: Implement isEnabledFor(level) method. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky f788f667ca logging: Some performance and memory use optimizations. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky fbbc3674b4 logging: basicConfig(): Implement "stream" argument. 2016-01-29 23:45:36 +02:00
Paul Sokolovsky c607efe88a logging: Remove outdated comment. 2016-01-17 00:38:11 +02:00
Delio Brignoli 8bc154764a logging: log to sys.stderr instead of sys.stdout 2015-06-22 20:41:31 +03:00
Paul Sokolovsky 2c2f6104f4 logging: Add top-level info(), debug() functions. 2015-06-05 01:34:00 +03:00
Paul Sokolovsky eb2ebffa74 logging: basicConfig: Accept (and ignore) filename & format args. 2015-06-04 19:08:13 +03:00
Paul Sokolovsky 1bb98d55cc logging: Set default level as INFO, DEBUG is too spammy. 2014-11-14 02:43:09 +02:00
Paul Sokolovsky 3e8cd1de1b logging: Add rudimentary support for logging level configuartion. 2014-04-26 05:27:01 +03:00
Paul Sokolovsky a7bea0674c logging: Add very basic implementation. 2014-04-21 00:07:12 +03:00
Paul Sokolovsky 86d676cf58 logging: Add dummy module to preclude import errors. 2014-04-13 04:57:45 +03:00