Philipp Hörist pushed to branch master at gajim / gajim


Commits:
c3fb396b by Philipp Hörist at 2024-11-23T16:22:30+01:00
imprv: Logging: Harmonize logging timestamps

- - - - -


1 changed file:

- gajim/common/logging_helpers.py


Changes:

=====================================
gajim/common/logging_helpers.py
=====================================
@@ -117,6 +117,8 @@ def set_callback(self,
         self._callback = func
 
 
+logging.Formatter.default_msec_format = None
+
 class FancyFormatter(logging.Formatter):
     '''
     An eye-candy formatter with Colors
@@ -131,9 +133,8 @@ class FancyFormatter(logging.Formatter):
 
     def __init__(self,
                  fmt: str | None = None,
-                 datefmt: str | None = None,
                  use_color: bool = False) -> None:
-        logging.Formatter.__init__(self, fmt, datefmt)
+        logging.Formatter.__init__(self, fmt)
         self.use_color = use_color
 
     def format(self, record: logging.LogRecord) -> str:
@@ -167,7 +168,6 @@ def init() -> None:
     stream_handler.setFormatter(
         FancyFormatter(
             '%(asctime)s %(levelname)s %(name)-35s %(message)s',
-            '%Y-%m-%dT%H:%M:%S',
             use_color
         )
     )
@@ -248,7 +248,6 @@ def _cleanup_debug_logs() -> None:
 _log_console_handler.setFormatter(
     logging.Formatter(
         '%(asctime)s (%(levelname).1s) %(name)-35s | %(message)s\n',
-        '%x %H:%M:%S'
     )
 )
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/c3fb396be6c467b381a0aed04a311c778cca9ac9

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/c3fb396be6c467b381a0aed04a311c778cca9ac9
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to