bind 查询日志与一般启动日志分离保存

时间:2023-02-01 08:10:30

看手册,写了下试验也成功了

 

 

logging{
        channel query_log{
                file "/var/log/named/query.log" versions 3 size 256m;
                #severity warning;
                print-time yes;
                print-severity yes;
                print-category yes;
        };
        category queries{
                query_log;
        };

        channel default_log{
                file "/var/log/named/bind.log" versions 3 size 256m;
                #severity warning;
                print-time yes;
                print-severity yes;
                print-category yes;
        };
        category default{
                default_log;
        };
};

 

记录下.....