Browse Source

added logger name to logging format

Fabian Peter Hammerle 3 years ago
parent
commit
699ecd6bda
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      switchbot_mqtt/__init__.py

+ 1 - 0
CHANGELOG.md

@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   - Upgrade `paho-mqtt` to no longer suppress exceptions occuring in mqtt callbacks
     ( https://github.com/eclipse/paho.mqtt.python/blob/v1.5.1/ChangeLog.txt#L4 )
   - Build stage: revert user after applying `chown` workaround for inter-stage copy
+- Log format: added name of logger between level and message
 
 ## [0.5.0] - 2020-11-22
 ### Added

+ 1 - 1
switchbot_mqtt/__init__.py

@@ -257,7 +257,7 @@ def _run(
 def _main() -> None:
     logging.basicConfig(
         level=logging.DEBUG,
-        format="%(asctime)s:%(levelname)s:%(message)s",
+        format="%(asctime)s:%(levelname)s:%(name)s:%(message)s",
         datefmt="%Y-%m-%dT%H:%M:%S%z",
     )
     argparser = argparse.ArgumentParser(