diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2015-01-06 11:19:42 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2015-01-06 11:19:42 (GMT) |
commit | 02980426d001dfdcdf683476184b43ab1b1dd5b8 (patch) | |
tree | bffcf4fbadfeb85e4e9e936922d0bc1ab903e744 | |
parent | 2fb1efe4f4e78be665d45b0ebde0553213362fff (diff) | |
download | cpython-02980426d001dfdcdf683476184b43ab1b1dd5b8.zip cpython-02980426d001dfdcdf683476184b43ab1b1dd5b8.tar.gz cpython-02980426d001dfdcdf683476184b43ab1b1dd5b8.tar.bz2 |
Closes #21980: Added a __repr__ for LogRecord.
-rw-r--r-- | Lib/logging/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 37132d9..5113966 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2001-2014 by Vinay Sajip. All Rights Reserved. +# Copyright 2001-2015 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, @@ -18,7 +18,7 @@ Logging package for Python. Based on PEP 282 and comments thereto in comp.lang.python. -Copyright (C) 2001-2014 Vinay Sajip. All Rights Reserved. +Copyright (C) 2001-2015 Vinay Sajip. All Rights Reserved. To use, simply 'import logging' and log away! """ @@ -316,6 +316,8 @@ class LogRecord(object): return '<LogRecord: %s, %s, %s, %s, "%s">'%(self.name, self.levelno, self.pathname, self.lineno, self.msg) + __repr__ = __str__ + def getMessage(self): """ Return the message for this LogRecord. |