How to log local messages in local time and forward with UTC using rsyslog
Issue
- Locally logged messages that are needed to reflect the configured system time zone and the messages that are forwarded to reflect UTC time.
- We want to write local logs with timestamps that match the system time zone and forward the logs with UTC timestamps.
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
rsyslog-8.24.0-12
and above.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.