How to use the cysystemd._journal.syslog_priorities 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
import collections
import logging
import traceback
import uuid
from enum import IntEnum, unique

from ._journal import send, syslog_priorities


_priorities = syslog_priorities()


__all__ = "write", "send", "Priority", "JournaldLogHandler", "Facility"


@unique
class Priority(IntEnum):
    PANIC = _priorities["panic"]
    WARNING = _priorities["warn"]
    ALERT = _priorities["alert"]
    NONE = _priorities["none"]
    CRITICAL = _priorities["crit"]
    DEBUG = _priorities["debug"]
    INFO = _priorities["info"]
    ERROR = _priorities["error"]
    NOTICE = _priorities["notice"]