Operating System - HP-UX
1827249 Members
2775 Online
109716 Solutions
New Discussion

redirect bind logs out of the syslog.log

 
SOLVED
Go to solution
jpcast_real
Regular Advisor

redirect bind logs out of the syslog.log

Hello,

I need to redirect bin logs out of the syslog.log . I have tried to modied the named.conf but it seems the structure I have made is not correct. I have also tried to modify the syslog.conf but I has not worked.

The configuration which does not work:

logging {
category default { debug ; };
category general { "debug" ; };
category security { "debug" ; };
category config { "debug" ; };
category resolver { "debug" ; };
category xfer-in { "debug" ; };
category xfer-out { "debug" ; };
category notify { "debug" ; };
category client { "debug" ; };
category unmatched { "debug" ; };
category network { "debug" ; };
category update { "debug" ; };
category queries { "debug" ; };
category dispatch { "debug" ; };
category dnssec { "debug" ; };
channel debug {
file "named.log" versions 2 size 50m;
print-time yes;
print-category yes;
};
};


The syslog messages :

May 12 14:34:04 Aramis named[7564]: starting. named 8.1.2 Fri Nov 21 05:54:28 GMT 2003 PH
NE_30068
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:2: syntax error near debug
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:3: invalid logging category 'general'
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:4: unknown channel 'debug'
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:5: unknown channel 'debug'
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:6: invalid logging category 'resolver'
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:7: unknown channel 'debug'
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:8: unknown channel 'debug'
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:9: unknown channel 'debug'
May 12 14:34:04 Aramis named[7564]: /etc/named.conf:10: invalid logging category 'client'
Aramis:/var/adm/syslog> named -version

Any help will be good revarded , "with points"



Here rests one who was not what he wanted and didn't want what he was
3 REPLIES 3
Rainer von Bongartz
Honored Contributor
Solution

Re: redirect bind logs out of the syslog.log

Try it this way, it works for me at last:

logging{
channel "simple_log" {
file "/var/adm/syslog/named.log" versions 3 size 5m;
severity warning;
print-time yes;
print-severity yes;
print-category yes;
};

channel "query_log" {
file "/var/adm/syslog/query.log" versions 3 size 5m;
print-time yes;
print-severity yes;
print-category yes;
};

category default{
"simple_log";
};
category client{
"simple_log";
};
category queries{
"query_log";
};
category general{
"simple_log";
};


Regards
rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Rick Garland
Honored Contributor

Re: redirect bind logs out of the syslog.log

Another option would be to recompile the BIND and in the configure option tell it what the log file is suppose to be.
Bejoy C Alias
Respected Contributor

Re: redirect bind logs out of the syslog.log

U r using bind 8.1.2 as from the syslog. It may not be supporting the logging categories client , resolver , general ( I am not sure ). Also u r not using quotes at the first category . Try declaring the channels first and the categories after wards.
Be Always Joy ......