From a2a8946bd9eb1264981458f3c004a0e4d06bb45a Mon Sep 17 00:00:00 2001 From: cemysce <13400533+cemysce@users.noreply.github.com> Date: Mon, 28 Nov 2022 13:25:03 -0500 Subject: [PATCH] gh-99811: Use correct variable to search for time in format string (GH-99812) Use correct variable to search for asctime (cherry picked from commit 1d1bb95abdcafe92c771fb3dc4722351b032cc24) Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com> --- Lib/logging/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 458c5fb7d0dcca..bcee2bab0b81aa 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -496,7 +496,7 @@ def __init__(self, *args, **kwargs): def usesTime(self): fmt = self._fmt - return fmt.find('$asctime') >= 0 or fmt.find(self.asctime_format) >= 0 + return fmt.find('$asctime') >= 0 or fmt.find(self.asctime_search) >= 0 def validate(self): pattern = Template.pattern