pelita icon indicating copy to clipboard operation
pelita copied to clipboard

log verbosity of new server mode

Open otizonaizit opened this issue 8 months ago • 1 comments

When running the new server mode as a systemd service, everything the bots would print on stdout lands into the journal. This is suboptimal. For example:

May 28 15:21:57 python python[35592]: Finished (- rounds): Smart Eating Players (4) vs Group0 (2)
May 28 15:21:57 python python[35701]: True (30, 3) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}
May 28 15:21:57 python python[35701]: True (29, 1) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}
May 28 15:21:57 python python[35701]: True (29, 3) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}
May 28 15:21:57 python python[35701]: True (28, 1) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}
May 28 15:21:57 python python[35701]: True (28, 3) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}
May 28 15:21:57 python python[35701]: True (27, 1) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}
May 28 15:21:57 python python[35701]: True (27, 3) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}
May 28 15:21:57 python python[35701]: True (26, 1) {0: (None, None), 1: (None, None), 'graph': <networkx.classes.graph.Graph object at 0x7fd958c62390>}

Also, the entries in the journal are prefixed by the string python. Maybe we should use setproctitle to set the process name to something more useful like pelita-server or so...

otizonaizit avatar May 28 '24 13:05 otizonaizit