Module Expr Str ImportFrom alias Import alias Import alias Import alias TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str FunctionDef arguments args NameParam defaults NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str ListLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad TupleLoad Str SubscriptLoad NameLoad Index Str TupleLoad Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr ListComp TupleLoad Str NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str For TupleStore NameStore NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Return NameLoad If UnaryOpNot Call NameLoad Call NameLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad If CompareIn Str NameLoad body If UnaryOpNot Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Return NameLoad If CompareGt Call NameLoad SubscriptLoad NameLoad Index Str Num body Expr Call AttributeLoad NameLoad attr Str Return NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body If UnaryOpNot NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad body Return Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Num For NameStore SubscriptLoad NameLoad Index Str body Assign NameStore BinOpBitOr NameLoad Call NameLoad NameLoad NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Str keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpBitOr NameLoad NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str Return IfExp CompareIsNot NameLoad NameLoad NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list
N/A N/A 
Return data to the host operating system's syslog facility

To use the syslog returner, append '--return syslog' to the
salt command.

.. code-block:: bash

    salt '*' test.ping --return syslog

The following fields can be set in the minion conf file::

    syslog.level (optional, Default: LOG_INFO)
    syslog.facility (optional, Default: LOG_USER)
    syslog.tag (optional, Default: salt-minion)
    syslog.options (list, optional, Default: [])

Available levels, facilities, and options can be found in the
``syslog`` docs for your python version.

.. note::

    The default tag comes from ``sys.argv[0]`` which is
    usually "salt-minion" but could be different based on
    the specific environment.

Configuration example:

.. code-block:: yaml

    syslog.level: 'LOG_ERR'
    syslog.facility: 'LOG_DAEMON'
    syslog.tag: 'mysalt'
    syslog.options:
      - LOG_PID

Of course you can also nest the options:

.. code-block:: yaml

    syslog:
      level: 'LOG_ERR'
      facility: 'LOG_DAEMON'
      tag: 'mysalt'
      options:
        - LOG_PID

Alternative configuration values can be used by
prefacing the configuration. Any values not found
in the alternative configuration will be pulled from
the default location:

.. code-block:: yaml

    alternative.syslog.level: 'LOG_WARN'
    alternative.syslog.facility: 'LOG_NEWS'

To use the alternative configuration, append
``--return_config alternative`` to the salt command.

.. versionadded:: 2015.5.0

.. code-block:: bash

    salt '*' test.ping --return syslog --return_config alternative

To override individual configuration items, append
--return_kwargs '{"key:": "value"}' to the salt command.

.. versionadded:: 2016.3.0

.. code-block:: bash

    salt '*' test.ping --return syslog --return_kwargs '{"level": "LOG_DEBUG"}'

.. note::

    Syslog server implementations may have limits on the maximum
    record size received by the client. This may lead to job
    return data being truncated in the syslog server's logs. For
    example, for rsyslog on RHEL-based systems, the default
    maximum record size is approximately 2KB (which return data
    can easily exceed). This is configurable in rsyslog.conf via
    the $MaxMessageSize config parameter. Please consult your syslog
    implmentation's documentation to determine how to adjust this limit.

 __future__ absolute_import N/A logging N/A six N/A json N/A N/A N/A syslog N/A HAS_SYSLOG True N/A N/A N/A ImportError N/A N/A HAS_SYSLOG False N/A salt.utils.jid N/A salt.returners N/A log N/A N/A logging getLogger __name__ N/A __virtualname__ syslog _get_options N/A N/A ret N/A None N/A N/A 
    Get the returner options from salt.
     N/A defaults N/A level facility options LOG_INFO LOG_USER N/A N/A attrs N/A level facility tag options level facility tag options N/A _options N/A N/A N/A salt returners get_returner_options __virtualname__ ret attrs __salt__ __salt__ __opts__ __opts__ defaults defaults N/A _options N/A _verify_options N/A N/A options N/A N/A N/A 
    Verify options and log warnings

    Returns True if all options can be verified,
    otherwise False
     N/A bitwise_args N/A N/A level N/A options N/A level N/A facility N/A options N/A facility N/A N/A N/A bitwise_args extend N/A N/A option x N/A x N/A options N/A options N/A N/A opt_name opt bitwise_args N/A N/A N/A N/A hasattr syslog opt N/A N/A N/A N/A log error N/A N/A syslog has no attribute {0} format opt N/A False N/A N/A N/A isinstance N/A getattr syslog opt int N/A N/A N/A N/A log error N/A N/A {0} is not a valid syslog {1} format opt opt_name N/A False N/A N/A tag options N/A N/A N/A N/A isinstance N/A options N/A tag N/A six string_types N/A N/A N/A N/A log error tag must be a string N/A False N/A N/A N/A len N/A options N/A tag 32 N/A N/A N/A N/A log error tag size is limited to 32 characters N/A False N/A True N/A __virtual__ N/A N/A N/A N/A N/A N/A HAS_SYSLOG N/A N/A False N/A __virtualname__ N/A returner N/A N/A ret N/A N/A N/A 
    Return data to the local syslog
     N/A _options N/A _get_options ret N/A N/A N/A _verify_options _options N/A N/A N/A level N/A getattr syslog N/A _options N/A level N/A facility N/A getattr syslog N/A _options N/A facility N/A logoption 0 N/A opt N/A _options N/A options N/A N/A logoption N/A logoption N/A getattr syslog opt N/A N/A tag _options N/A N/A N/A N/A syslog openlog ident N/A _options N/A tag logoption logoption N/A N/A N/A N/A syslog openlog logoption logoption N/A N/A N/A syslog syslog N/A facility level N/A N/A {0} format N/A N/A json dumps ret N/A N/A N/A syslog closelog N/A prep_jid N/A N/A nocache passed_jid N/A False None N/A N/A 
    Do any work necessary to prepare a JID, including sending a custom id
     N/A N/A N/A passed_jid None passed_jid N/A N/A N/A N/A salt utils jid gen_jid N/A