diff options
author | Saz <me@saz.sh> | 2011-12-03 15:58:43 +0100 |
---|---|---|
committer | Saz <me@saz.sh> | 2011-12-03 15:58:43 +0100 |
commit | 337f49341241737d6664ac9c53dec5647090ecec (patch) | |
tree | 78f82e92389743bcd3cc6ceb4263dec92302317c | |
parent | 53b8b635b4a012844b6f236b13cf79a976a238e3 (diff) |
use ForwardFormat for remote logging, switch back to TraditionalFileFormat on local logging
-rw-r--r-- | templates/client.conf.erb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/client.conf.erb b/templates/client.conf.erb index c29784b..149cc93 100644 --- a/templates/client.conf.erb +++ b/templates/client.conf.erb @@ -8,11 +8,17 @@ $ActionQueueSaveOnShutdown on # save messages to disk on shutdown $ActionQueueType LinkedList # run asynchronously $ActionResumeRetryCount -1 # infinety retries if host is down +# Use ForwardFormat for remote logging +$ActionFileDefaultTemplate RSYSLOG_ForwardFormat + # Log to remote syslog server using relp $ModLoad omrelp *.* :omrelp:<%= scope.lookupvar('rsyslog::client::server') -%>:2514;RSYSLOG_ForwardFormat <% if scope.lookupvar('rsyslog::client::log_auth_local') or scope.lookupvar('rsyslog::client::log_local') -%> +# We log locally, restore to default format +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat + # Log auth messages locally auth,authpriv.* /var/log/auth.log <% end -%> |