Cloudlog: cleanup zmq cloudlog warnings (#28896)

* Laikad: cleanup zmq cloudlog warnings

* Handle in cloudlog

* whitespace

* whitespace

* suppress before reconnecting in thread
old-commit-hash: 8f3037c956
beeps
Harald Schäfer 2 years ago committed by GitHub
parent f505f3be3a
commit fa823fadd2
  1. 3
      system/swaglog.py

@ -1,6 +1,7 @@
import logging
import os
import time
import warnings
from pathlib import Path
from logging.handlers import BaseRotatingHandler
@ -90,6 +91,8 @@ class UnixDomainSocketHandler(logging.Handler):
def emit(self, record):
if os.getpid() != self.pid:
# TODO suppresses warning about forking proc with zmq socket, fix root cause
warnings.filterwarnings("ignore", category=ResourceWarning, message="unclosed.*<zmq.*>")
self.connect()
msg = self.format(record).rstrip('\n')

Loading…
Cancel
Save