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 6
  • rsyslog

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.