Skip to content

Commit c0e9cf5

Browse files
committed
write vrouter-agent log to file
closes-jira-bug: CEM-22496 Change-Id: Ibc6f02a178fd92b7ba31121e658fed38cc6cd048
1 parent 0f1c3c9 commit c0e9cf5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

containers/vrouter/agent/entrypoint.sh

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
#!/bin/bash
2+
3+
# save container output to log
4+
log_dir=${CONTAINER_LOG_DIR:-${LOG_DIR:-'/var/log/contrail'}/${NODE_TYPE}-${SERVICE_NAME}}
5+
mkdir -p $log_dir
6+
log_file="$log_dir/vrouter-agent-entrypoint.log"
7+
touch "$log_file"
8+
exec &> >(tee -a "$log_file")
9+
chmod 600 $log_file
10+
echo "INFO: =================== $(date) ==================="
11+
212
source /actions.sh
313

414
echo "INFO: agent started in $AGENT_MODE mode"

0 commit comments

Comments
 (0)