$year

Returns the current year as a four-digit number.

This property belongs to the Time-Related System Properties group.

Name:

$year

Category:

Time-Related System Properties

Type:

integer

Description

The current year (4-digit).

Usage

template(name="example" type="list") {
    property(name="$year")
}

See also

See rsyslog Properties for the category overview.


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.