| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
representation of logging level. (GH-24693) (#24825)
(cherry picked from commit bbba28212ce0f58096a4043f32442c6e727b74fc)
Automerge-Triggered-By: GH:vsajip
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
| |
(cherry picked from commit e9959c71185d0850c84e3aba0301fbc238f194a9)
|
|
|
| |
(cherry picked from commit a619af43ccd10bab363b1e59814a2e2727422545)
|
|
|
|
|
|
|
|
|
|
| |
logging.handlers.MemoryHandler (GH-21765) (GH-21898)
(cherry picked from commit 2353d77fad7ed9d11d8a4d66b5dd1306cdb94125)
Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Automerge-Triggered-By: @vsajip
|
|
|
|
|
| |
isEnabledFor (GH-17689) (GH-17897)
(cherry picked from commit 950c6795aa0ffa85e103a13e7a04e08cb34c66ad)
|
|
|
|
|
|
| |
(GH-17773) (GH-17785)
(cherry picked from commit 46abfc1416ff8e450999611ef8f231ff871ab133)
|
|
|
|
| |
(cherry picked from commit 1d094af716e8ce5e5710e1dfbce7832ba333be55)
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
(GH-11908)
|
|
|
|
|
| |
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.
|
|
|
|
| |
Classes that define __str__ the same as __repr__ can
just inherit it from object.
|
| |
|
|
|
|
|
| |
(GH-11537)
QueueHandler.prepare() now makes a copy of the record before modifying and enqueueing it, to avoid affecting other handlers in the chain.
|
| |
|
|
|
|
| |
matches in logging.Formatter (GH-9703)
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
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.
|
|
|
|
| |
8601. (GH-6702)
|
|
|
|
| |
(GH-2624)
|
| |
|
| |
|
|
|
| |
TimedRotatingFileHandler.getFilesToDelete() now sorts only when needed.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Due to a bug in the initial fix, the setter was in fact creating a different
property. This is now fixed.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|
|
|
| |
kwargs. (GH-2979)
|
| |
|
| |
|
|
|
|
| |
stream. (GH-2921)
|
| |
|
|
|
| |
Implemented pickling for loggers.
|
|
|
|
| |
(#1676)
|
|
|
|
|
|
|
|
| |
* 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())
|
|
|
|
| |
collections. (#1263)
|
|
|
|
| |
(#663) (#663)
|
|\ |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|