From 18e5b9e71e0c3d848dfb098267afc10646682383 Mon Sep 17 00:00:00 2001 From: picksitquick Date: Thu, 14 Mar 2024 02:50:12 +0530 Subject: [PATCH] adding logging configs --- gamedoora-gateway.service | 2 +- src/main/resources/application.properties | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gamedoora-gateway.service b/gamedoora-gateway.service index 099d41b..a0dfd0d 100644 --- a/gamedoora-gateway.service +++ b/gamedoora-gateway.service @@ -6,6 +6,6 @@ After=syslog.target gamedoora-config-server.service User=gamedoora ExecStart=/opt/gamedoora/gamedoora-gateway.jar SuccessExitStatus=143 -Environment="CONFIG_SERVER=http://localhost:8888" +Environment="CONFIG_SERVER=http://localhost:8888 LOG_PATH=/var/log/gamedoora/gateway_logs" [Install] WantedBy=multi-user.target diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ddf4035..755bb06 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,3 +1,7 @@ server.port=8000 spring.application.name=gateway -spring.config.import=optional:configserver:${CONFIG_SERVER} \ No newline at end of file +spring.config.import=optional:configserver:${CONFIG_SERVER} +logging.file.name=${LOG_PATH}/gateway.log +logging.pattern.file= %d{yyyy-MMM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{15} - %msg%n +logging.pattern.console= %d{yyyy-MMM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{15} - %msg%n +logging.level.com.gamedoora=DEBUG \ No newline at end of file