-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The logger includes prefixes with the service name and the federation, read from env variables.
- Loading branch information
Showing
5 changed files
with
44 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
####################################################### | ||
# Build the spring boot maven project | ||
####################################################### | ||
FROM maven:3.9.3-amazoncorretto-17 as mvn-build-env | ||
FROM maven:3.9.3-amazoncorretto-17 AS mvn-build-env | ||
MAINTAINER Thanasis Karampatsis <[email protected]> | ||
|
||
ENV CODE_PATH="/opt/code" | ||
|
@@ -33,14 +33,19 @@ ENV APP_CONFIG_TEMPLATE="/opt/config/application.tmpl" | |
ENV APP_CONFIG_LOCATION="/opt/config/application.yml" | ||
ENV SPRING_CONFIG_LOCATION="file:/opt/config/application.yml" | ||
|
||
ENV SERVICE="portal-backend" | ||
ENV FEDERATION="default" | ||
ENV LOG_LEVEL="INFO" | ||
ENV FRAMEWORK_LOG_LEVEL="INFO" | ||
|
||
WORKDIR /opt | ||
|
||
RUN apk add --no-cache curl | ||
|
||
####################################################### | ||
# Install dockerize | ||
####################################################### | ||
ENV DOCKERIZE_VERSION v0.6.1 | ||
ENV DOCKERIZE_VERSION=v0.6.1 | ||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | ||
&& rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Configuration: | ||
name: Default | ||
|
||
Properties: | ||
Property: | ||
name: log-path | ||
value: "logs" | ||
|
||
Appenders: | ||
Console: | ||
name: ConsoleAppender | ||
target: SYSTEM_OUT | ||
PatternLayout: | ||
pattern: "%d{yyyy-MM-dd HH:mm:ss.SSS} - %-5level - %logger{36} - [${env:FEDERATION:-default}] - [${env:SERVICE:-portal-backend}] - %msg%n" | ||
|
||
Loggers: | ||
logger: | ||
- name: hbp.mip | ||
level: ${env:LOG_LEVEL:-INFO} | ||
additivity: false # Prevent log propagation to parent loggers | ||
AppenderRef: | ||
- ref: ConsoleAppender | ||
|
||
Root: | ||
level: ${env:LOG_LEVEL_FRAMEWORK:-INFO} | ||
AppenderRef: | ||
- ref: ConsoleAppender |