def log()

in pystemd/journal.pyx [0:0]


def log(int priority, message, **kwargs):
  """
  Send a `message` to the journal with the `priority` specified
  examples:

  ```python
import logging
import pystemd.journal

pystemd.journal.log(
  logging.INFO,
  "everything is awesome",
  SYSLOG_IDENTIFIER="tegan"
)
  ```
  """

  stack = inspect.stack()[0]


  CODE_FILE = stack[1]
  CODE_LINE = stack[2]
  CODE_FUNC = stack[3]
  CODE_CONTEXT = stack[4]

  sendv(
    MESSAGE=x2char_star(message),
    PRIORITY=priority,
    CODE_FILE=CODE_FILE,
    CODE_LINE=CODE_LINE,
    CODE_FUNC=CODE_FUNC,
    CODE_CONTEXT=CODE_CONTEXT,
    **kwargs
  )