How to configure rsyslog to write Linux Container logs to a separate file

Solution Verified - Updated -

Issue

  • Container workload messages are written to the /var/log/messages file, and we would like them written to a separate file instead. Is that possible?
  • How can I avoid container workload messages being written to /var/log/messages?

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Containerized workloads

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content