mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2024-11-09 22:24:06 -08:00
Clean up log output
This commit is contained in:
parent
3450e98dc5
commit
eaf2fbb8f8
|
@ -28,6 +28,8 @@ class JS8CallClient:
|
||||||
def __init__(self, interface, logger=None):
|
def __init__(self, interface, logger=None):
|
||||||
self.logger = logger or logging.getLogger('js8call')
|
self.logger = logger or logging.getLogger('js8call')
|
||||||
self.logger.setLevel(logging.INFO)
|
self.logger.setLevel(logging.INFO)
|
||||||
|
self.logger.propagate = False
|
||||||
|
|
||||||
self.config = configparser.ConfigParser()
|
self.config = configparser.ConfigParser()
|
||||||
self.config.read(config_file)
|
self.config.read(config_file)
|
||||||
|
|
||||||
|
@ -98,7 +100,6 @@ class JS8CallClient:
|
||||||
INSERT INTO messages (sender, receiver, message)
|
INSERT INTO messages (sender, receiver, message)
|
||||||
VALUES (?, ?, ?)
|
VALUES (?, ?, ?)
|
||||||
''', (sender, receiver, message))
|
''', (sender, receiver, message))
|
||||||
self.logger.info(f"Message inserted: {sender} to {receiver} - {message}")
|
|
||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
self.logger.error(f"Failed to insert message into database: {e}")
|
self.logger.error(f"Failed to insert message into database: {e}")
|
||||||
|
|
||||||
|
@ -127,7 +128,6 @@ class JS8CallClient:
|
||||||
INSERT INTO urgent (sender, groupname, message)
|
INSERT INTO urgent (sender, groupname, message)
|
||||||
VALUES (?, ?, ?)
|
VALUES (?, ?, ?)
|
||||||
''', (sender, groupname, message))
|
''', (sender, groupname, message))
|
||||||
self.logger.info(f"Urgent message inserted: {sender} to {groupname} - {message}")
|
|
||||||
except sqlite3.Error as e:
|
except sqlite3.Error as e:
|
||||||
self.logger.error(f"Failed to insert urgent message into database: {e}")
|
self.logger.error(f"Failed to insert urgent message into database: {e}")
|
||||||
|
|
||||||
|
@ -293,4 +293,4 @@ def handle_group_message_selection(sender_id, message, step, state, interface):
|
||||||
send_message("Invalid group selection. Please choose again.", sender_id, interface)
|
send_message("Invalid group selection. Please choose again.", sender_id, interface)
|
||||||
handle_group_messages_command(sender_id, interface)
|
handle_group_messages_command(sender_id, interface)
|
||||||
|
|
||||||
handle_js8call_command(sender_id, interface)
|
handle_js8call_command(sender_id, interface)
|
Loading…
Reference in a new issue