Results 1 to 2 of 2

Thread: user-defined syslog facilities possible?

  1. #1

    Default user-defined syslog facilities possible?

    It it possible to create user-defined syslog facilities?

    For example, I put the following in /etc/rsyslog.conf

    local7.* -/var/log/myapp/myapp;RSYSLOG_TraditionalFileFormat

    I then enter the following on the command-line:

    Code:
    $ logger -p local7.info "test of logging to local7"
    resulting in the following line being written to /var/log/myapp/myapp

    Apr 2 14:42:36 ngssuse ngsshatt: test of logging to local7

    What I want is a way - other than using an environment variable - to replace local7.info with myapp.info. as the -p argument in the logger command and achieve the same result.

    Is that possible?

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: user-defined syslog facilities possible?

    No, the set of facilities is fixed, you have to choose one of the classifications. However if you just want to get the program name into the log, the tag (-t) argument to logger is what you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •