1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
.. _prop-message-programname:
.. _properties.message.programname:
programname
===========
.. index::
single: properties; programname
single: programname
.. summary-start
Extracts the static program name portion from the syslog tag.
.. summary-end
This property belongs to the **Message Properties** group.
:Name: programname
:Category: Message Properties
:Type: string
Description
-----------
The "static" part of the tag, as defined by BSD syslogd. For example, when TAG
is "named[12345]", programname is "named".
Precisely, the programname is terminated by either (whichever occurs first):
- end of tag
- nonprintable character
- ':'
- '['
- '/'
The above definition has been taken from the FreeBSD syslogd sources.
Please note that some applications include slashes in the static part of the
tag, e.g. "app/foo[1234]". In this case, programname is "app". If they store an
absolute path name like in "/app/foo[1234]", programname will become empty
(""). If you need to actually store slashes as part of the programname, you can
use the global option:
.. code-block:: rsyslog
global(parser.permitSlashInProgramName="on")
to permit this. Then, a syslogtag of "/app/foo[1234]" will result in programname
being "/app/foo". Note: this option is available starting at rsyslogd version
8.25.0.
Usage
-----
.. _properties.message.programname-usage:
.. code-block:: rsyslog
template(name="example" type="list") {
property(name="programname")
}
See also
--------
See :doc:`../../configuration/properties` for the category overview.
|