File: rs-getenv.rst

package info (click to toggle)
rsyslog-doc 8.2302.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,464 kB
  • sloc: python: 178; makefile: 8
file content (23 lines) | stat: -rw-r--r-- 387 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
********
getenv()
********

Purpose
=======

getenv(str)

Like the OS call, returns the value of the environment variable,
if it exists. Returns an empty string if it does not exist.


Examples
========

The following example can be used to build a dynamic filter based on
some environment variable:

.. code-block:: none

   if $msg contains getenv('TRIGGERVAR') then /path/to/errfile