summaryrefslogtreecommitdiffstats
path: root/Lib/logging
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43353: Document that logging.getLevelName() accepts string ↵Mariusz Felisiak2021-03-171-2/+6
| | | | | | | representation of logging level. (GH-24693) (#24825) (cherry picked from commit bbba28212ce0f58096a4043f32442c6e727b74fc) Automerge-Triggered-By: GH:vsajip
* bpo-42644: Validate values in logging.disable() (GH-23786)Miss Islington (bot)2020-12-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | * bpo-42644: Validate values in logging.disable() Technically make the value of manager a property that checks and convert values assigned to it properly. This has the side effect of making `logging.disable` also accept strings representing the various level of warnings. We want to validate the type of the disable attribute at assignment time, as it is later compared to other levels when emitting warnings and would generate a `TypeError: '>=' not supported between ....` in a different part of the code base, which can make it difficult to track down. When assigned an incorrect value; it will raise a TypeError when the wrong type, or ValueError if an invalid str. Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit b32d8b4f9bcd2e7d11240b6b9de0262cf8f5e09d) Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
* bpo-42011: Update documentation of logging.Filter.filter() (GH-22692) (GH-22724)Miss Skeleton (bot)2020-10-161-2/+2
| | | (cherry picked from commit e9959c71185d0850c84e3aba0301fbc238f194a9)
* Delete extra 'the' from `Formatter` class docstring (GH-22530) (GH-22543)Miss Skeleton (bot)2020-10-041-1/+1
| | | (cherry picked from commit a619af43ccd10bab363b1e59814a2e2727422545)
* [3.8] bpo-41503: Fix race between setTarget and flush in ↵Miss Islington (bot)2020-08-161-1/+5
| | | | | | | | | | logging.handlers.MemoryHandler (GH-21765) (GH-21898) (cherry picked from commit 2353d77fad7ed9d11d8a4d66b5dd1306cdb94125) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com> Automerge-Triggered-By: @vsajip
* bpo-39198: Ensure logging global lock is released on exception in ↵Miss Islington (bot)2020-01-071-6/+9
| | | | | isEnabledFor (GH-17689) (GH-17897) (cherry picked from commit 950c6795aa0ffa85e103a13e7a04e08cb34c66ad)
* bpo-39142: Avoid converting namedtuple instances to ConvertingTuple. ↵Miss Islington (bot)2020-01-011-1/+1
| | | | | | (GH-17773) (GH-17785) (cherry picked from commit 46abfc1416ff8e450999611ef8f231ff871ab133)
* Updated incorrect level-setting code to use setLevel(). (GH-16325) (GH-16327)Miss Islington (bot)2019-09-221-5/+6
| | | | (cherry picked from commit 1d094af716e8ce5e5710e1dfbce7832ba333be55)
* Fix extraneous whitespace in QueueListener.prepare (GH-13803)Boris Feld2019-06-041-1/+1
|
* bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)Bar Harel2019-06-011-0/+2
| | | | | | | | Fixed QueueListener in order to avoid random deadlocks. Unable to add regression tests atm due to time constraints, will add it in a bit. Regarding implementation, although it's nested, it does not cause performance issues whatsoever, and does not call task_done() in case of an exception (which is the right thing to do IMHO). https://bugs.python.org/issue36813
* bpo-36015: Handle StreamHandler representaton of stream with an integer name ↵Riccardo Magliocchetti2019-05-071-0/+2
| | | | (GH-11908)
* bpo-36533: Reinit logging.Handler locks on fork(). (GH-12704)Gregory P. Smith2019-05-071-36/+25
| | | | | Instead of attempting to acquire and release them all across fork which was leading to deadlocks in some applications that had chained their own handlers while holding multiple locks.
* bpo-36793: Remove unneeded __str__ definitions. (GH-13081)Serhiy Storchaka2019-05-061-3/+1
| | | | Classes that define __str__ the same as __repr__ can just inherit it from object.
* bpo-36272: Logging now propagates RecursionError (GH-12312)Rémi Lapeyre2019-03-151-0/+4
|
* bpo-35726: Prevented QueueHandler formatting from affecting other handlers ↵Manjusaka2019-01-231-0/+3
| | | | | (GH-11537) QueueHandler.prepare() now makes a copy of the record before modifying and enqueueing it, to avoid affecting other handlers in the chain.
* bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042)Josh Snyder2018-10-231-2/+2
|
* bpo-34844: logging.Formatter enhancement - Ensure style and format string ↵BNMetrics2018-10-152-6/+72
| | | | matches in logging.Formatter (GH-9703)
* bpo-34334: Don't log traceback twice in QueueHandler (GH-9537)Cheryl Sabella2018-09-251-2/+3
|
* bpo-6721: Hold logging locks across fork() (GH-4071)Gregory P. Smith2018-09-141-0/+50
| | | | | | | | | bpo-6721: When os.fork() was called while another thread holds a logging lock, the child process may deadlock when it tries to log. This fixes that by acquiring all logging locks before fork and releasing them afterwards. A regression test that fails before this change is included. Within the new unittest itself: There is a small _potential_ due to mixing of fork and a thread in the child process if the parent's thread happened to hold a non-reentrant library call lock (malloc?) when the os.fork() happens. buildbots and time will tell if this actually manifests itself in this test or not. :/ A functionality test that avoids that would be a challenge. An alternate test that isn't trying to produce the deadlock itself but just checking that the release and acquire calls are made would be the next best alternative if so.
* bpo-34415: Updated logging.Formatter docstring. (GH-8811)Vinay Sajip2018-08-191-1/+2
|
* bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008)Xtreak2018-07-021-4/+11
|
* bpo-33897: Add a 'force' keyword argument to logging.basicConfig(). (GH-7873)Dong-hee Na2018-06-251-2/+14
|
* bpo-33165: Added stacklevel parameter to logging APIs. (GH-7424)Vinay Sajip2018-06-051-3/+10
|
* bpo-33606: improve logging performance when logger is disabled (GH-7285)Timo Furrer2018-06-011-0/+3
| | | A check has been added in Logger.isEnabledFor() to return False when the logger is disabled. This avoids unnecessary work being done when a disabled logger is used.
* bpo-33400: Clarified documentation to indicate no strict adherence to ISO ↵Vinay Sajip2018-05-041-8/+9
| | | | 8601. (GH-6702)
* Revert unneccessary changes made in bpo-30296 and apply other improvements. ↵Serhiy Storchaka2018-02-261-2/+2
| | | | (GH-2624)
* bpo-30904: Removed duplicated Host: header. (#4465)Vinay Sajip2017-11-191-1/+3
|
* Changed lambda to str.strip in _strip_spaces in logging.config (#4332)sanjayp2017-11-151-2/+2
|
* bpo-30989: Sort in TimedRotatingFileHandler only when needed. (GH-2812)Lovesh Harchandani2017-10-271-1/+1
| | | TimedRotatingFileHandler.getFilesToDelete() now sorts only when needed.
* bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (#4044)Łukasz Langa2017-10-191-1/+5
| | | | | | | | | | | This used to be the case on Python 2. Commit 212b590e118e3650b596917021ed9612a918180b changed the implementation for Python 3, making the `log()` method of LogAdapter call `logger._log()` directly. This makes nested log adapters not execute their ``process()`` method. This patch fixes the issue. Also, now proxying `name`, too, to make `repr()` work with nested log adapters. New tests added.
* bpo-31457: Make the `LoggerAdapter.manager` property settable (#4042)Łukasz Langa2017-10-191-1/+1
| | | | Due to a bug in the initial fix, the setter was in fact creating a different property. This is now fixed.
* bpo-31457: Allow for nested LoggerAdapter objects (#3551)Łukasz Langa2017-09-141-0/+21
| | | | | | Some of the proxied methods use internal Logger state which isn't proxied, causing failures if an adapter is applied to another adapter. This commit fixes the issue, adds a new test for the use case.
* bpo-30830: logging.config.listen() calls server_close() (#3524)Victor Stinner2017-09-131-1/+1
| | | | | | | | | | The ConfigSocketReceiver.serve_until_stopped() method from logging.config.listen() now calls server_close() (of socketserver.ThreadingTCPServer) rather than closing manually the socket. While this change has no effect yet, it will help to prevent dangling threads once ThreadingTCPServer.server_close() will join spawned threads (bpo-31233).
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-073-131/+111
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* bpo-31080: Allowed logging.config.fileConfig() to accept both args and ↵Preston Landers2017-08-021-2/+4
| | | | kwargs. (GH-2979)
* bpo-31084: QueueHandler now formats messages correctly. (GH-2954)favll2017-08-011-4/+5
|
* Updated LoggerAdapter.isEnabledFor to take advantage of caching. (GH-2951)Vinay Sajip2017-07-301-3/+1
|
* bpo-30522: Implemented a method to allow setting a logging.StreamHander's ↵Vinay Sajip2017-07-301-0/+20
| | | | stream. (GH-2921)
* bpo-30962: Added caching to Logger.isEnabledFor() (GH-2752)Avram Lubkin2017-07-301-3/+27
|
* bpo-30520: Implemented pickling for loggers. (#1956)Vinay Sajip2017-06-061-2/+13
| | | Implemented pickling for loggers.
* bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses ↵Xiang Zhang2017-06-011-5/+20
| | | | (#1676)
* bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)Jon Dufresne2017-05-181-2/+2
| | | | | | | | * Replaced list(<generator expression>) with list comprehension * Replaced dict(<generator expression>) with dict comprehension * Replaced set(<list literal>) with set literal * Replaced builtin func(<list comprehension>) with func(<generator expression>) when supported (e.g. any(), all(), tuple(), min(), & max())
* bpo-30144: Import collections ABC from collections.abc rather than ↵Serhiy Storchaka2017-04-241-3/+3
| | | | collections. (#1263)
* bpo-29808: SysLogHandler: Do not fail if initial connect to syslog failed ↵Коренберг Марк2017-03-171-1/+8
| | | | (#663) (#663)
* Issue #29220: Merged fixes from 3.6.Vinay Sajip2017-01-111-5/+6
|\
| * Issue #292Merged fixes from 3.5.Vinay Sajip2017-01-111-3/+8
| |\
| | * Issue #29220: Improved fix and test.Vinay Sajip2017-01-111-3/+8
| | |
* | | Closes #29220: Fixed regression in logging.getLevelName().Vinay Sajip2017-01-111-3/+7
| | |
* | | Closes #28524: added default level for logging.disable().Vinay Sajip2016-12-311-1/+1
| | |
* | | Issue #28335: made minor improvement to implementation.Vinay Sajip2016-10-031-1/+1
| | |