Skip to content

Commit

Permalink
Allow to change std out log file name
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 committed Jan 31, 2024
1 parent 92adc58 commit 4bfff10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions collector/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

DEFAULT_API_PORT="8080"
JAR_FILE="collector-all.jar"
LOG_FILE="/app/logs/collector-out.log"
SERVICE_NAME="Cyface Collector API"

main() {
Expand All @@ -34,6 +33,10 @@ main() {
}

loadApiParameters() {
if [ -z "$CYFACE_API_STD_OUT_FILE" ]; then
CYFACE_API_STD_OUT_FILE="/app/logs/collector-out.log"
fi

if [ -z "$CYFACE_API_PORT" ]; then
CYFACE_API_PORT=$DEFAULT_API_PORT
fi
Expand Down Expand Up @@ -216,7 +219,7 @@ startApi() {
-Dlogback.configurationFile=/app/logback.xml \
-jar $JAR_FILE \
-conf "$CONFIG" \
&> $LOG_FILE
&> $CYFACE_API_STD_OUT_FILE
echo "API started or failed. Checking logs might give more insights."
}

Expand Down

0 comments on commit 4bfff10

Please sign in to comment.