Improved analysis tools for containerized application

Details:
- Added a file appender for the logs
- Installed vim to easily navigate logs
This commit is contained in:
Biagio Peccerillo 2024-12-10 12:24:57 +01:00
parent 2b54a98760
commit 3f413c8391
2 changed files with 20 additions and 11 deletions

View File

@ -1,8 +1,11 @@
FROM harbor.d4science.org/gcube/smartgears-distribution:4.0.0-SNAPSHOT-java17-tomcat10.1.19
# Install vim
RUN apt update && apt install -y vim
RUN mkdir -p /etc/config/storagehub
COPY ./target/storagehub.war /tomcat/webapps/
COPY ./docker/jackrabbit /app/jackrabbit
COPY ./docker/storagehub.xml /tomcat/conf/Catalina/localhost/
COPY ./docker/logback.xml /etc/
COPY ./docker/container.ini /etc/
RUN mkdir -p /etc/config/storagehub
COPY ./docker/storage-settings.properties /etc/config/storagehub/
COPY ./docker/storage-settings.properties /etc/config/storagehub/

View File

@ -1,25 +1,31 @@
<configuration scan="true" debug="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>Ï
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>storagehub.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.gcube" level="DEBUG" />
<logger name="org.gcube.smartgears" level="TRACE" />
<logger name="org.gcube.smartgears.handlers" level="TRACE"/>
<logger name="org.gcube.smartgears.handlers" level="TRACE" />
<logger name="org.gcube.common.events" level="WARN" />
<logger name="org.gcube.data.publishing" level="ERROR" />
<logger name="org.gcube.documentstore" level="ERROR" />
<logger name="org.gcube.common.core.publisher.is.legacy" level="TRACE" />
<logger name="org.gcube.data.access" level="TRACE" />
<logger name="org.gcube.data.access.storagehub.handlers" level="DEBUG"/>
<logger name="org.gcube.data.access.storagehub.handlers" level="DEBUG" />
<root level="WARN">
<appender-ref ref="STDOUT" />
</root>
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>