How to use the cysystemd.journal.JournaldLogger function in cysystemd

To help you get started, we’ve selected a few cysystemd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mosquito / cysystemd / cysystemd / journal.py View on Github external
if tb_message:
            data["traceback"] = tb_message

        send(**data)


handler = JournaldLogHandler()


class JournaldLogger(logging.Logger):
    def __init__(self, level, name="root"):
        super(JournaldLogger, self).__init__(name, level)
        self.addHandler(handler)


Logger = JournaldLogger(logging.WARNING)
github mosquito / cysystemd / cysystemd / journal.py View on Github external
def __init__(self, level, name="root"):
        super(JournaldLogger, self).__init__(name, level)
        self.addHandler(handler)