About Archive Other Contact

syslog-ng.conf

@version: 3.25

options
  {
    chain_hostnames(no);
    create_dirs (no);
    dir_perm(0755);
    dns_cache(yes);
    keep_hostname(yes);
    log_fifo_size(2048);
    log_msg_size(8192);
    perm(0600);
    stats_freq(3600);
    flush_lines(0);
    time_reopen(10);
    use_dns(yes);
    use_fqdn(yes);
  };

source s_local
  {
    unix-dgram("/var/run/log");
    internal();
  };

filter f_authpriv       { facility(authpriv); };
filter f_console        { facility(console); };
filter f_cron           { facility(cron); };
filter f_daemon         { facility(daemon); };
filter f_ftp            { facility(ftp); };
filter f_kern           { facility(kern); };
filter f_lpr            { facility(lpr); };
filter f_mail           { facility(mail); };
filter f_news           { facility(news); };
filter f_security       { facility(security); };
filter f_user           { facility(user); };
filter f_uucp           { facility(uucp); };
filter f_local0         { facility(local0); };
filter f_local1         { facility(local1); };
filter f_local2         { facility(local2); };
filter f_local3         { facility(local3); };
filter f_local4         { facility(local4); };
filter f_local5         { facility(local5); };
filter f_local6         { facility(local6); };
filter f_local7         { facility(local7); };

filter f_emerg          { level(emerg); };
filter f_alert          { level(alert..emerg); };
filter f_crit           { level(crit..emerg); };
filter f_err            { level(err..emerg); };
filter f_warning        { level(warning..emerg); };
filter f_notice         { level(notice..emerg); };
filter f_info           { level(info..emerg); };
filter f_debug          { level(debug..emerg); };

filter f_auth           { facility(auth) and level(notice..emerg); };
filter f_ppp            { program("ppp"); };
filter f_con            { facility(kern) and level(err..emerg); };
filter f_messages       { level(debug..emerg) and not facility(local0); };

destination d_console   { file("/dev/console"); };
destination d_root      { usertty("root"); };
destination d_messages  { file("/var/log/messages" owner("root") group("wheel") perm(0600)); };
destination d_cron      { file("/var/log/cron.log" owner("root") group("wheel") perm(0600)); };
destination d_auth      { file("/var/log/auth.log" owner("root") group("wheel") perm(0600)); };
destination d_daemon    { file("/var/log/daemon.log" owner("root") group("wheel") perm(0600)); };

log { source(s_local);  filter(f_crit);         destination(d_root); };
log { source(s_local);  filter(f_con);          destination(d_console); };
log { source(s_local);  filter(f_messages);     destination(d_messages); };
log { source(s_local);  filter(f_cron);         destination(d_cron); };
log { source(s_local);  filter(f_auth);         destination(d_auth); };
log { source(s_local);  filter(f_daemon);       destination(d_daemon); };

@include "/usr/local/etc/syslog-ng/conf.d/"

Updated: January 7, 2020