mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Closes #21980: Added a __repr__ for LogRecord.
This commit is contained in:
parent
2fb1efe4f4
commit
02980426d0
1 changed files with 4 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue