chore: configure syslog for web servers

This commit is contained in:
tcely
2026-05-16 07:13:25 -04:00
parent f53a70baca
commit 0b3be91894
4 changed files with 9 additions and 4 deletions

View File

@@ -61,8 +61,10 @@ http {
# Logging # Logging
log_format host '$remote_addr - $remote_user [$time_local] "[$host] $request" $status $bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"'; log_format host '$remote_addr - $remote_user [$time_local] "[$host] $request" $status $bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"';
access_log /dev/stdout; ##access_log /dev/stdout;
error_log stderr; access_log syslog:server=unix:/dev/log,facility=local1,nohostname;
error_log syslog:server=unix:/dev/log,facility=local1,nohostname info;
error_log stderr error;
# GZIP # GZIP
gzip on; gzip on;

View File

@@ -35,10 +35,13 @@ wsgi_app = 'tubesync.wsgi:application'
##### Logging ##### Logging
# Access logs are printed to stdout from nginx # Access logs are printed to stdout from nginx
accesslog = None ##accesslog = None
errorlog = '-' ##errorlog = '-'
loglevel = 'info' loglevel = 'info'
capture_output = True capture_output = True
syslog = True
syslog_addr = 'unix:///dev/log'
syslog_facility = 'local2'
##### Process ##### Process
proc_name = 'gunicorn' proc_name = 'gunicorn'