How do I send logs to a different location based on the name of the application?

Solution Verified - Updated -

Issue

  • Want to write application log data to someplace other than /var/log/messages.
  • Want to redirect it to use another file, based on the programname.
  • Prefer to have something specific to the application, instead of going by loglevel or security level.

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • rsyslog

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