| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
(GH-117157) (GH-117158)
(cherry picked from commit 00baaa21de229a6db80ff2b84c2fd6ad1999a24c)
|
| |
|
|
|
|
|
|
|
| |
logging.TimedRotatingFileHandler (GH-116220) (GH-116893)
Fix support of interval values > 1 in logging.TimedRotatingFileHandler
for when='MIDNIGHT' and when='Wx'.
(cherry picked from commit 269051d20e65eda30734cbbbdb07d21df61978d6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-115812) (GH-116262)
Improve algorithm for computing which rolled-over log files to delete
in logging.TimedRotatingFileHandler. It is now reliable for handlers
without namer and with arbitrary deterministic namer that leaves
the datetime part in the file name unmodified.
(cherry picked from commit 87faec28c78f6fa8eaaebbd1ababf687c7508e71)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-116242)
(cherry picked from commit 07236f5b39a2e534cf190cd4f7c73300d209520b)
Co-authored-by: Tristan Pank <tristanpank@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
* Do not overwrite already rolled over files. It happened at midnight or
during the DST change and caused the loss of data.
* computeRollover() now always return the timestamp larger than the
specified time.
* Fix computation of the rollover time during the DST change.
(cherry picked from commit fee86fd9a422612b39e5aabf2571b8fe4abac770)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
| |
extension (GH-93224) (GH-115785)
(cherry picked from commit 113687a8381d6dde179aeede607bcbca5c09d182)
Co-authored-by: Gabriele Catania <gabriele.ctn@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-115355) (GH-115357)
Also add more tests for LoggerAdapter.
Also support stacklevel in LoggerAdapter._log().
(cherry picked from commit 225856ef3e6c5e4f234ede1dd118b57f6e8f6d0e)
(cherry picked from commit 91822018eeba12a6c9eabbc748363b2fd4291b30)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
| |
correctly. (GH-110943) (GH-111914)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-111319) (#111392)
Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.htmlGH-deprecated-string-functions
Also, fix a comment in logging about locale-specific behavior of `str.lower()`.
(cherry picked from commit 6d42759c5e47ab62d60a72b4ff15d29864554579)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
| |
|
|
|
| |
(GH-107029) (GH-107066)
(cherry picked from commit 5e5a34ac3a827e040cd89426b1774fec2123336a)
|
| |
|
|
|
|
|
|
|
| |
(GH-103628) (#104687)
* gh-103606: Improve error message from logging.config.FileConfig (GH-103628)
(cherry picked from commit 152227b569c3a9b87fe0483706f704762ced6d75)
plus backport the followup exception change fix to that in #104701
|
| |
|
|
|
|
| |
(GH-99812) (GH-99851)
(cherry picked from commit 1d1bb95abdcafe92c771fb3dc4722351b032cc24)
Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
|
| |
|
|
|
| |
(GH-98325)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
|
| |
|
|
| |
(GH-96532)
|
| |
|
|
| |
(GH-96340) (GH-96341)
|
| |
|
|
| |
(GH-96322) (GH-96337)
|
| |
|
|
|
| |
logging.TimedRotat… (GH-96182) (GH-96196)
Co-authored-by: Duncan Grisby <duncan-github@grisby.org>
|
| |
|
|
|
| |
(GH-94564)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
|
| |
|
|
|
|
| |
The root logger is now accessible via its name, see
https://github.com/python/cpython/pull/15077
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
| |
|
|
|
| |
`logging.StreamHandler` (#92129)
Closes #92128
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
When configuring the logging stack, accept already built filters (or
just callables) in the filters array of loggers and handlers.
This facilitates passing quick callables as filters.
Automerge-Triggered-By: GH:vsajip
|
| | |
|
| |
|
|
| |
(GH-30093)
|
| | |
|
| |
|
|
|
|
|
| |
(GH-28822)
…iles.
Also changed some historical return values from 1 -> True and 0 -> False.
|
| | |
|
| |
|
|
| |
deleted (GH-27475)
|
| |
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
| |
|
| |
Automerge-Triggered-By: GH:vsajip
|
| |
|
|
|
| |
(GH-27140)
…e().
|
| |
|
| |
Added a function that returns a copy of a dict of logging levels.
|
| |
|
|
|
|
| |
The list lookups become a big burden for very long lists.
This patch changes the "happy flow" path of 2 lookups into 1 lookup.
Automerge-Triggered-By: GH:vsajip
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fix _sitebuiltins
* Fix test_inspect
* Fix test_interpreters
* Fix test_io
* Fix test_iter
* Fix test_json
* Fix test_linecache
* Fix test_lltrace
* Fix test_logging
* Fix logging
|
| |
|
|
|
|
|
| |
representation of logging level. (GH-24693)
[bpo-43353]()
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The logging.FileHandler class now keeps a reference to the builtin
open() function to be able to open or reopen the file during Python
finalization.
Fix errors like:
Exception ignored in: (...)
Traceback (most recent call last):
(...)
File ".../logging/__init__.py", line 1463, in error
File ".../logging/__init__.py", line 1577, in _log
File ".../logging/__init__.py", line 1587, in handle
File ".../logging/__init__.py", line 1649, in callHandlers
File ".../logging/__init__.py", line 948, in handle
File ".../logging/__init__.py", line 1182, in emit
File ".../logging/__init__.py", line 1171, in _open
NameError: name 'open' is not defined
|
| | |
|
| | |
|
| |
|
|
|
| |
Same changes as #22276 squashed to a single commit. Just hoping to get Travis to cooperate by opening a new PR...
Automerge-Triggered-By: @vsajip
|
| |
|
|
| |
logging.handlers.MemoryHandler (GH-21765)
|
| |
|
|
|
| |
Docs and tests are underway.
Automerge-Triggered-By: @vsajip
|
| |
|
|
|
| |
(GH-20563)
Automerge-Triggered-By: @vsajip
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'extra' argument is not always used by custom logger adapters. For
example:
```python
class IndentAdapter(logging.LoggerAdapter):
def process(self, msg, kwargs):
indent = kwargs.pop(indent, 1)
return ' ' * indent + msg, kwargs
```
It is cleaner and friendlier to default the 'extra' argument to None
instead of either forcing the subclasses of LoggerAdapter to pass a None
value directly or to override the constructor.
This change is backward compatible because existing calls to
`LoggerAdapter.__init__` are already passing a value for the second
argument.
Automerge-Triggered-By: @vsajip
|
| | |
|
| |
|
|
|
|
|
| |
Fix a hang at fork in the logging module: the new private
_at_fork_reinit() method is now used to reinitialize locks at fork in
the child process.
The createLock() method is no longer used at fork.
|
| | |
|