]> granicus.if.org Git - python/commitdiff
Closes #21980: Added a __repr__ for LogRecord.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 6 Jan 2015 11:19:42 +0000 (11:19 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 6 Jan 2015 11:19:42 +0000 (11:19 +0000)
Lib/logging/__init__.py

index 37132d909ff28b5a9c078386c5c5d232cec9f5cf..5113966a5e8eae94a257d39a423b050f0ed0f498 100644 (file)
@@ -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.