在/etc/named.conf 中增加日誌選項

duhaiyang發表於2007-12-08
在/etc/named.conf 中增加日誌選項
/etc/named.conf中logging 選項,增加以下選項後,系統會在/var/log/named/ 下增加dns-default.log,dns-lamer.log,dns-query.log,dns-security.log,dns-security.log五個檔案,同時/var/log/named 路徑必須有named的相關許可權。
logging {
channel default_log {
file "/var/log/named/dns-default.log" versions 10 size 1m;
severity info;
};
channel lamer_log {
file "/var/log/named/dns-lamer.log" versions 3 size 1m;
severity info;
print-severity yes;
print-time yes;
print-category yes;
};
channel query_log {
file "/var/log/named/dns-query.log" versions 10 size 10m;
severity info;
};
channel security_log {
file "/var/log/named/dns-security.log" versions 3 size 1m;
severity info;
print-severity yes;
print-time yes;
print-category yes;
};
category lame-servers { lamer_log; };
category security{ security_log;};
category queries { query_log;};
category default {default_log;};
};[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/52450/viewspace-989974/,如需轉載,請註明出處,否則將追究法律責任。

相關文章