stateFile

Deprecated; sets a fixed state file name for this input.

This parameter applies to imfile: Text File Input Module.

Name:

stateFile

Scope:

input

Type:

string (see Rsyslog Parameter String Constants)

Default:

none

Required?:

no

Introduced:

at least 5.x, possibly earlier

Description

Specifies the name of this file’s state file. This parameter should usually not be used. When wildcards are present in the monitored file name, all matching files share the same state file, which typically causes confusion and is unlikely to work properly. Upon startup, rsyslog tries to detect such cases and emits warning messages, but complex wildcard patterns may go unnoticed. For details, see State Files in the module documentation.

Input usage

input(type="imfile" stateFile="/path/to/state")

Notes

  • Deprecated; rely on automatically generated state file names instead.

Legacy names (for reference)

Historic names/directives for compatibility. Do not use in new configs.

  • $InputFileStateFile — maps to stateFile (status: legacy)

See also

See also imfile: Text File Input Module.


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.