# Privacy-enhanced rsyslog configuration
# Minimal logging configuration for enhanced privacy
# Generated by Algo VPN privacy role

# Global settings for privacy
$ModLoad imuxsock # provides support for local system logging
$ModLoad imklog   # provides kernel logging support

# Reduce logging verbosity
$KLogPermitNonKernelFacility on
$SystemLogSocketName /run/systemd/journal/syslog

# Privacy-enhanced rules
{% if privacy_advanced.reduce_kernel_verbosity %}
# Reduce kernel message verbosity
kern.info;kern.!debug    /var/log/kern.log
{% else %}
kern.*                   /var/log/kern.log
{% endif %}

# Essential system messages only
*.emerg                  :omusrmsg:*
*.alert                  /var/log/alert.log
*.crit                   /var/log/critical.log
*.err                    /var/log/error.log

# Compress and limit emergency logs
$template PrivacyTemplate,"%timegenerated% %hostname% %syslogtag%%msg%\n"
$ActionFileDefaultTemplate PrivacyTemplate

# Stop processing after essential logs to prevent detailed logging
& stop
