mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
PaaS run script: redirect stderr to stdout
This commit is contained in:
@@ -25,15 +25,10 @@ function configure_aws_logs {
|
||||
[general]
|
||||
state_file = /home/vcap/logs/awslogs-state
|
||||
|
||||
[/home/vcap/logs/app-stdout.log]
|
||||
file = /home/vcap/logs/app-stdout.log*
|
||||
[/home/vcap/logs/app.log]
|
||||
file = /home/vcap/logs/app.log*
|
||||
log_group_name = paas-${CW_APP_NAME}-application
|
||||
log_stream_name = {hostname}-stdout
|
||||
|
||||
[/home/vcap/logs/app-stderr.log]
|
||||
file = /home/vcap/logs/app-stderr.log*
|
||||
log_group_name = paas-${CW_APP_NAME}-application
|
||||
log_stream_name = {hostname}-stderr
|
||||
log_stream_name = {hostname}
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -58,7 +53,7 @@ function on_exit {
|
||||
}
|
||||
|
||||
function start_appplication {
|
||||
exec "$@" 2>/home/vcap/logs/app-stderr.log | while read line; do echo $line; echo $line >> /home/vcap/logs/app-stdout.log.`date +%Y-%m-%d`; done &
|
||||
exec "$@" 2>&1 | while read line; do echo $line; echo $line >> /home/vcap/logs/app.log.`date +%Y-%m-%d`; done &
|
||||
LOGGER_PID=$!
|
||||
APP_PID=`jobs -p`
|
||||
echo "Logger process pid: ${LOGGER_PID}"
|
||||
|
||||
Reference in New Issue
Block a user