kopia lustrzana https://github.com/mate-dev/meshtastic-matrix-relay
Logger formatting changes
rodzic
c4ec798de3
commit
df85e35e14
|
@ -78,7 +78,7 @@ meshtastic:
|
||||||
logging:
|
logging:
|
||||||
level: "info"
|
level: "info"
|
||||||
show_timestamps: true
|
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
|
## Usage
|
||||||
|
|
2
main.py
2
main.py
|
@ -25,7 +25,7 @@ with open("config.yaml", "r") as f:
|
||||||
relay_config = yaml.load(f, Loader=SafeLoader)
|
relay_config = yaml.load(f, Loader=SafeLoader)
|
||||||
|
|
||||||
# Configure logging
|
# Configure logging
|
||||||
logger = logging.getLogger(name="meshtastic.matrix.relay")
|
logger = logging.getLogger(name="MMRELAY")
|
||||||
log_level = getattr(logging, relay_config["logging"]["level"].upper())
|
log_level = getattr(logging, relay_config["logging"]["level"].upper())
|
||||||
show_timestamps = relay_config["logging"]["show_timestamps"]
|
show_timestamps = relay_config["logging"]["show_timestamps"]
|
||||||
timestamp_format = relay_config["logging"]["timestamp_format"]
|
timestamp_format = relay_config["logging"]["timestamp_format"]
|
||||||
|
|
Ładowanie…
Reference in New Issue