opennms-forge / docker-minion

🐳 Docker container running the minion service
MIT License
6 stars 5 forks source link

Log level - MINION_LOG_LEVEL #16

Closed syepes closed 5 years ago

syepes commented 5 years ago

It would be great to have a MINION_LOG_LEVEL environment variable to control the default logging level. The current karaf.log default is way to noisy for production usage.

indigo423 commented 5 years ago

There are basically two options:

  1. Connect to Karaf shell and execute log:set WARN
  2. Use the etc-overlay and place a org.ops4j.pax.logging.cfg with your custom log setting there

You can get a copy of the file with:

  1. docker-compose ps or docker ps to get the running container name or id.
  2. docker cp <container-id or name>:/opt/minion/etc/org.ops4j.pax.logging.cfg etc-overlay/

Mount etc-overlay into the container with

volumes:
  - ./etc-overlay:/opt/minion-etc-overlay
syepes commented 5 years ago

@indigo423 Thanks for the options. Actually I have just tried the minion-etc-overlay option and it does not seam to work. Was this added to the last image?

indigo423 commented 5 years ago

@syepes this is an outstanding PR here #15. The image for testing can be downloaded here: https://1368-80622030-gh.circle-artifacts.com/0/home/circleci/minion/minion-docker-image when it works and someone verified there are no other issues we can merge the PR.

syepes commented 5 years ago

@indigo423 Sorry did not see it was still open, I'll give it a try tonight and will send you my feedback so hopefully we can get this into the 23.x

indigo423 commented 5 years ago

@syepes thank you for feedback would be nice if someone else than me could give it a try :)

syepes commented 5 years ago

@indigo423 Just for your info, the image works on my side. I'll close my PR request as this will take care of it.

indigo423 commented 5 years ago

@syepes thank you for your help to get this to work. I've merged to master and triggered a build. The etc-overlay is available in Minion image with version 23.0.1.