diff --git a/jena-fuseki/README.md b/jena-fuseki/README.md index 579d5b3..6e2e7a8 100644 --- a/jena-fuseki/README.md +++ b/jena-fuseki/README.md @@ -63,6 +63,21 @@ heap (default: 1200 MiB), set the `JVM_ARGS` environment with `-e`: docker run -p 3030:3030 -e JVM_ARGS=-Xmx2g stain/jena-fuseki +## Customize logging + +The Docker container outputs logs to stdout which can be read by using docker logs CONTAINER_ID. +The log entries follows the pattern of `09:44:30 INFO Entrypoint :: Initializing Apache Jena Fuseki`. +The first component is the timestamp of the event and it can changed with the LOG_FORMAT variable. + +For example if you were to start the container like this: + +```docker run -p 3030:3030 -e LOG_FORMAT="%y-%m-%d %H:%M:%S %% %Z" stain/jena-fuseki``` + +Then you would see log entries like theese: + +```24-12-14 09:44:30 % UTC INFO Entrypoint :: Initializing Apache Jena Fuseki``` + +Please read the man page for date(1) for information about strfttime format. ## Data persistence diff --git a/jena-fuseki/docker-entrypoint.sh b/jena-fuseki/docker-entrypoint.sh index 4e00948..37d09bf 100644 --- a/jena-fuseki/docker-entrypoint.sh +++ b/jena-fuseki/docker-entrypoint.sh @@ -29,7 +29,7 @@ set -e if [ ! -z "$LOG_FORMAT" ] && ! echo -n "$LOG_FORMAT" | grep -qE '^((%[aAbBcdHIjmMpSUwWxXyYZFT%])|[^%])+$'; then invalid_strfttime_format=$LOG_FORMAT unset LOG_FORMAT - log "WARNING" "Invalid strfttime date format specifier in '$invalid_strfttime_format'." + log "WARN" "Invalid strfttime date format specifier in '$invalid_strfttime_format'." fi if [ ! -f "$FUSEKI_BASE/shiro.ini" ] ; then