+ Logging, Syslog and Log Anaylsys Forums » Forums » Syslog & syslogd » syslog-ng
|-+ 

how to add facility and level to log entry with syslog-ng.......urgent

Username:
Password:
News:

Pages: [1]
0 Members and 1 Guest are viewing this topic. Topic Tools  
Read July 24, 2008, 06:08:38 am #0
taka1112004

how to add facility and level to log entry with syslog-ng.......urgent

Hi guys,

I have a problem that has troubled me for quite a long time, in a short ,the problem is like as following:
a want to add the corresponding facility and level into the every log info i received,however,(as a freshman ,i haven't completely understood how to config to meet my requirement .) every entry of log info in my file didn't have the facility.it's just like below:

Jul 13 18:57:47 10.240.46.16 36: *Mar  1 03:02:54: %SYS-5-CONFIG_I: Configured from console by console

and the format i want is like this :
<local1.info> Jul 13 18:57:47 10.240.46.16 36: *Mar  1 03:02:54: %SYS-5-CONFIG_I: Configured from console by console

i've looked up the web for a long time ,though i know syslog-ng must have the ability to attach the  facility and level to every log entry ,the detail config can't be found ,
so what i want is a sample from which i can learn how to config the syslog-ng .

the another question is what should i add to the config file to get the syslog-ng itself log info?

appreciate
Offline  
Read July 27, 2008, 07:37:56 pm #1
mutex

Re: how to add facility and level to log entry with syslog-ng.......urgent

You want to add something like this:
destination d_file {
             file("/var/log/messages"
                template("$FACILITY:$PRIORITY $MSG\n"; template_escape(no))); };
Offline  
Pages: [1]
Jump to:  


Information Security News | Jerry Bell's blog | Enterprise IT | Tropical Fish Information | Tropical Fish Forums