# This file is automatically generated. Manual changes will be lost.
# Generated at 2019-09-25 13:19:56 by loggingmanager.loggingmanager.SyslogConfWriter
#
# daemon version syslog-ng 3 (3.23.1)

@version:3.23
@include "scl.conf"

#   Options

options {
    log_msg_size(32768);
    stats_freq(0);
    flush_lines(100);
    flush_timeout(2000);
    mark_freq(0);
    frac_digits(3);
};

#   Rewrites

rewrite r_nocrlfs {
        subst("\n", " ", value("MESSAGE"), flags("global"));
        subst("\r", "^M", value("MESSAGE"), flags("global"));
};

#   Sources

source s_everything {
    internal();
    file("/proc/kmsg" log_fetch_limit(100) log_iw_size(100));
    unix_dgram("/var/log/log" log_fetch_limit(100) log_iw_size(100));
    udp(ip(127.0.0.1) port(514) log_fetch_limit(100) log_iw_size(100));
};

#   Destinations

destination messages        { file("/mnt/harddisk/log/messages" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination webconfig       { file("/mnt/harddisk/log/tandberg_webconfig.log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination kernel          { file("/mnt/harddisk/log/kernel" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination critical        { file("/mnt/harddisk/log/critical" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination apache_error    { file("/mnt/harddisk/log/apache_error_log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination apache_access   { file("/mnt/harddisk/log/apache_access" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination developer       { file("/mnt/harddisk/log/developer_log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); } ;
destination network         { file("/mnt/harddisk/log/network_log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); } ;
destination daemon          { file("/mnt/harddisk/log/daemon.log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination wall            { program("while read line; do echo $line|/usr/bin/wall; done" flush_timeout(100) ); };
destination avc             { file("/mnt/harddisk/log/avc.log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination audit           { file("/mnt/harddisk/log/audit.log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
destination hybrid_services { file("/mnt/harddisk/log/hybrid_services_log" perm(0644) template("$R_ISODATE $HOST $MSGHDR$MSG
") ); };
filter f_local7 { facility(local7); };

#local0 - administrator,local1 -config,local2 - mediastats(Oak only),local3 - apache error,local4 -etc/opt/apache2,local5 -developer,local6 -network,local7 - Hybrid Services(Oak only)
#   Filters
filter f_kern { facility(kern); };
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); }; - Appended above by Hybrid Services on Oak, to support older Expressway versions
filter f_daemon { facility(daemon); };
filter f_crit { level(crit..emerg); };
filter f_wall { facility(local0) and level(crit..emerg); };
filter f_avc { message("avc:"); };
filter f_audit { message("^audit") and not message("avc:"); };
filter f_certification { facility(local4) and message("TLS"); };

filter f_customer {
    facility(local0)
    or (level(info..emerg) and not facility(local1,local2,local3,local4,local5,local6,local7,kern,daemon))
    or (level(error) and facility(local3) )
    or (level(error..emerg) and facility(kern) )
};

#   Logs

log { source(s_everything); filter(f_kern);     rewrite( r_nocrlfs );   destination(kernel); };
log { source(s_everything); filter(f_local1);   rewrite( r_nocrlfs );   destination(webconfig); };
log { source(s_everything); filter(f_local3);   rewrite( r_nocrlfs );   destination(apache_error); };
log { source(s_everything); filter(f_local4);   rewrite( r_nocrlfs );   destination(apache_access); };
log { source(s_everything); filter(f_local5);   rewrite( r_nocrlfs );   destination(developer); };
log { source(s_everything); filter(f_local6);   rewrite( r_nocrlfs );   destination(network); };
log { source(s_everything); filter(f_daemon);   rewrite( r_nocrlfs );   destination(daemon); };
log { source(s_everything); filter(f_crit);     rewrite( r_nocrlfs );   destination(critical); };
log { source(s_everything); filter(f_customer); rewrite( r_nocrlfs );   destination(messages); };
log { source(s_everything); filter(f_wall);     rewrite( r_nocrlfs );   destination(wall); };
log { source(s_everything); filter(f_avc);      rewrite( r_nocrlfs );   destination(avc); };
log { source(s_everything); filter(f_audit);    rewrite( r_nocrlfs );   destination(audit); };
log { source(s_everything); filter(f_local7);   rewrite( r_nocrlfs );   destination(hybrid_services); };
#
# There are no remote syslog servers configured.
#

