1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-08-25 16:02:31 -04:00

Removed some RPC server log noise

This commit is contained in:
Hemna 2023-08-28 09:19:54 -04:00
parent 570fdb98a7
commit 82f77b7a6a

View File

@ -57,51 +57,43 @@ class APRSDService(rpyc.Service):
def on_connect(self, conn): def on_connect(self, conn):
# code that runs when a connection is created # code that runs when a connection is created
# (to init the service, if needed) # (to init the service, if needed)
LOG.info("Connected") LOG.info("RPC Client Connected")
self._conn = conn self._conn = conn
def on_disconnect(self, conn): def on_disconnect(self, conn):
# code that runs after the connection has already closed # code that runs after the connection has already closed
# (to finalize the service, if needed) # (to finalize the service, if needed)
LOG.info("Disconnected") LOG.info("RPC Client Disconnected")
self._conn = None self._conn = None
@rpyc.exposed @rpyc.exposed
def get_stats(self): def get_stats(self):
LOG.info("get_stats")
stat = stats.APRSDStats() stat = stats.APRSDStats()
stats_dict = stat.stats() stats_dict = stat.stats()
return_str = json.dumps(stats_dict, indent=4, sort_keys=True, default=str) return_str = json.dumps(stats_dict, indent=4, sort_keys=True, default=str)
LOG.info(f"get_stats: return size {len(return_str)}")
return return_str return return_str
@rpyc.exposed @rpyc.exposed
def get_stats_obj(self): def get_stats_obj(self):
LOG.info("get_stats_obj")
return stats.APRSDStats() return stats.APRSDStats()
@rpyc.exposed @rpyc.exposed
def get_packet_list(self): def get_packet_list(self):
LOG.info("get_packet_list")
return packets.PacketList() return packets.PacketList()
@rpyc.exposed @rpyc.exposed
def get_packet_track(self): def get_packet_track(self):
LOG.info("get_packet_track")
return packets.PacketTrack() return packets.PacketTrack()
@rpyc.exposed @rpyc.exposed
def get_watch_list(self): def get_watch_list(self):
LOG.info("get_watch_list")
return packets.WatchList() return packets.WatchList()
@rpyc.exposed @rpyc.exposed
def get_seen_list(self): def get_seen_list(self):
LOG.info("get_seen_list")
return packets.SeenList() return packets.SeenList()
@rpyc.exposed @rpyc.exposed
def get_log_entries(self): def get_log_entries(self):
LOG.info("get_log_entries")
entries = log_monitor.LogEntries().get_all_and_purge() entries = log_monitor.LogEntries().get_all_and_purge()
return json.dumps(entries, default=str) return json.dumps(entries, default=str)