improved logging with rsyslog
This commit is contained in:
30
logs/rsyslog.conf
Normal file
30
logs/rsyslog.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
#### Global directives ####
|
||||
|
||||
# Sets the directory that rsyslog uses for work files.
|
||||
$WorkDirectory /var/lib/rsyslog
|
||||
|
||||
# Sets default permissions for all log files.
|
||||
$FileOwner root
|
||||
$FileGroup root
|
||||
$FileCreateMode 0600
|
||||
$DirCreateMode 0700
|
||||
$Umask 0077
|
||||
|
||||
# Include all config files in /etc/rsyslog.d/.
|
||||
include(file="/etc/rsyslog.d/*.conf" mode="optional")
|
||||
|
||||
#### Modules ####
|
||||
|
||||
# Provides --MARK-- message capability.
|
||||
module(load="immark")
|
||||
|
||||
# Provides support for local system logging (e.g. via logger command).
|
||||
module(load="imuxsock")
|
||||
|
||||
# Nginx
|
||||
$template rawFormat,"%msg:2:2048%\n"
|
||||
local0.=notice /var/log/access.log;rawFormat
|
||||
local0.*;local0.!=notice /var/log/error.log;rawFormat
|
||||
|
||||
# PHP
|
||||
local1.* /var/log/php.log
|
||||
@@ -1,2 +0,0 @@
|
||||
local0.* /var/log/nginx.log
|
||||
local1.* /var/log/php.log
|
||||
Reference in New Issue
Block a user