logMessages 2 Disk

This commit is contained in:
SpudGunMan
2024-08-06 14:45:39 -07:00
parent 4549e6786f
commit dcd1c4235c
4 changed files with 6 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ Along with network testing, this bot has a lot of other features, like simple ma
The bot is also capable of using dual radio/nodes, so you can monitor two networks at the same time and send messages to nodes using the same `bbspost @nodeNumber #message` function. There is a small message board to fit in the constraints of Meshtastic for posting bulletin messages with `bbspost $subject #message`.
Store and forward-like message re-play with `messages`, and there is a repeater module for dual radio bots to cross post messages.
Store and forward-like message re-play with `messages`, and there is a repeater module for dual radio bots to cross post messages. Messages are also logged locally to disk.
The bot can also be used to monitor a frequency and let you know when activity is seen. Using Hamlib to watch the S meter on a connected radio. You can send alerts to channels when a frequency is detected for 20 seconds within the thresholds set in config.ini

View File

@@ -39,6 +39,8 @@ StoreLimit = 3
zuluTime = True
# wait time for URL requests
URL_TIMEOUT = 10
# logging to file of the non Bot messages
LogMessagesToFile = False
[bbs]
enabled = True

View File

@@ -58,4 +58,5 @@ file_handler.setFormatter(logging.Formatter(msgLogFormat))
# Add handlers to the logger
logger.addHandler(stdout_handler)
msgLogger.addHandler(file_handler)
if log_messages_to_file:
msgLogger.addHandler(file_handler)

View File

@@ -72,6 +72,7 @@ try:
bbsdb = config['bbs'].get('bbsdb', 'bbsdb.pkl')
dad_jokes_enabled = config['general'].getboolean('DadJokes', False)
store_forward_enabled = config['general'].getboolean('StoreForward', False)
log_messages_to_file = config['general'].getboolean('LogMessagesToFile', True) # default True
config['general'].get('motd', MOTD)
urlTimeoutSeconds = config['general'].getint('URL_TIMEOUT', 10) # default 10 seconds
forecastDuration = config['general'].getint('DAYS_OF_WEATHER', 4) # default days of weather