# escapeLF

Escapes embedded LF characters in multi-line messages as `#012` when enabled.

This parameter applies to imfile: Text File Input Module.

Name:

  escapeLF

Scope:

  input

Type:

  boolean

Default:

  on

Required?:

  no

Introduced:

  at least 8.x, possibly earlier

## Description

Only meaningful when multi-line messages are processed. LF characters inside messages cause issues with many tools. If set to `on`, LF characters are escaped to the sequence `#012`. By default escaping is enabled. If turned off, test carefully. When using plain TCP syslog with embedded LFs, enable octet-counted framing.

## Input usage

    input(type="imfile"
          File="/var/log/example.log"
          Tag="example"
          escapeLF="on")

## Notes

- Legacy documentation used the term `binary` for the type. It is treated as boolean.

## 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.