parent
6894fda5df
commit
09637b4120
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Collect all logs which come to /dev/log
|
||||
exec 2>&1
|
||||
echo $(realpath $0) started
|
||||
|
||||
set -x
|
||||
touch /var/log/nginx/access.log /var/log/nginx/error.log
|
||||
exec tail -f /var/log/nginx/access.log /var/log/nginx/error.log
|
||||
# exec chpst -Unobody socklog unix /dev/log
|
||||
# exec socklog unix /dev/log
|
||||
# exec socat UNIX-LISTEN:/dev/log,reuseaddr,fork -
|
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# file: nginx/log/run
|
||||
|
||||
# Collect all logs which come to stdout from the app
|
||||
exec 2>&1
|
||||
echo $(realpath $0) started
|
||||
|
||||
mkdir /var/log/nginx 2>/dev/null
|
||||
|
||||
exec svlogd -tt /var/log/nginx
|
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# file: showlog/run
|
||||
|
||||
# Make the logs visible on `docker logs` command
|
||||
exec 2>&1
|
||||
echo $(realpath $0) started
|
||||
|
||||
# A little timeout is required, since svlogd moves current log to an archive,
|
||||
# and only after that it starts logging to the "new" current log.
|
||||
sleep 2
|
||||
|
||||
exec tail -f /var/log/nginx/current 2>/dev/null
|
Loading…
Reference in new issue