Logger formatting changes

feature/plugins-parameters
Jeremiah K 2023-04-22 17:43:48 -05:00
rodzic c4ec798de3
commit df85e35e14
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -78,7 +78,7 @@ meshtastic:
logging:
level: "info"
show_timestamps: true
timestamp_format: '[%m/%d/%y]-%H:%M:%S'
timestamp_format: '[%H:%M:%S]' # [%m/%d/%y]-%H:%M:%S - as another example, if you prefer Date & Time
```
## Usage

Wyświetl plik

@ -25,7 +25,7 @@ with open("config.yaml", "r") as f:
relay_config = yaml.load(f, Loader=SafeLoader)
# Configure logging
logger = logging.getLogger(name="meshtastic.matrix.relay")
logger = logging.getLogger(name="MMRELAY")
log_level = getattr(logging, relay_config["logging"]["level"].upper())
show_timestamps = relay_config["logging"]["show_timestamps"]
timestamp_format = relay_config["logging"]["timestamp_format"]