Following advice, I'm planning to log errors from several time critical python processes (clients) to a single logging process (server). SysLogHandler seems to be the correct choice as it uses UDP (I rather be system-agnostic) and does not wait for any confirmation, and as I'm using localhost
so there should practically be no loss of logs.
However, I'm unclear as to how I should implement the server side on two accounts:
- Should I simply open a
multiprocessing.connection
andconn.recv()
the log as text? - Is there a way to handle the error as a log on the server side, thus printing it using other
logging.handlers
? Or is it just plain strings at that point?
A nice use-case would be for the time critical processes to send errors to the logging process which in turn would use SMTPHandler to send these errors via email...