mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-18 23:55:58 -05:00
Added config enable_packet_logging
If you want to disable the logging of packets to the log file, set this new common config option to False
This commit is contained in:
parent
c206f52a76
commit
63f3de47b7
@ -131,6 +131,11 @@ aprsd_opts = [
|
||||
help="Enable the Callsign seen list tracking feature. This allows aprsd to keep track of "
|
||||
"callsigns that have been seen and when they were last seen.",
|
||||
),
|
||||
cfg.BoolOpt(
|
||||
"enable_packet_logging",
|
||||
default=True,
|
||||
help="Set this to False, to disable logging of packets to the log file.",
|
||||
),
|
||||
]
|
||||
|
||||
watch_list_opts = [
|
||||
|
@ -20,6 +20,8 @@ PACKET_COLOR = "cyan"
|
||||
|
||||
def log_multiline(packet, tx: Optional[bool] = False, header: Optional[bool] = True) -> None:
|
||||
"""LOG a packet to the logfile."""
|
||||
if not CONF.enable_packet_logging:
|
||||
return
|
||||
if CONF.log_packet_format == "compact":
|
||||
return
|
||||
|
||||
@ -79,6 +81,8 @@ def log_multiline(packet, tx: Optional[bool] = False, header: Optional[bool] = T
|
||||
|
||||
|
||||
def log(packet, tx: Optional[bool] = False, header: Optional[bool] = True) -> None:
|
||||
if not CONF.enable_packet_logging:
|
||||
return
|
||||
if CONF.log_packet_format == "multiline":
|
||||
log_multiline(packet, tx, header)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user