I have a microservice developed and build with the Microservice Java SDK.
I added a logback-spring.xml
to my resources folder to configure my log appenders and log aggregation tool.
Unfortunately when my microservice is deployed I only see the first entry in my log aggregation tool:
2024-04-17 10:18:19.521 l=INFO c=c.c.m.l.c.LoggingEnvironmentRunListener t=main | logging.conf: /etc/dynamic-mapping-service/dynamic-mapping-service-logging.xml
Everything else is not forwarded.
So I ran the image locally and detected that in my image my logging config will be overwritten by the file /etc/dynamic-mapping-service/dynamic-mapping-service-logging.xml
directly after starting the microservice. This file seems to be generated by the SDK.
Btw. If I run the microservice natively everything work as expected. Only the image created on package seems to be faulty with a logging config I don’t want to use.
A few questions:
- How can I overwrite the generated logging.xml and use my logging config?
- Why is my logback-spring.xml file in the resources folder overwritten by this default file?