Stream: ibm
Topic: Setting Server Log Level
Christian Gulden (Jun 26 2020 at 18:56):
Apologies if this is a very basic question, but I can't figure out how to increase the log verbosity. Setting <logging traceSpecification="*=all:com.ibm.fhir.*=all" />
in server.xml didn't seem to to the trick. I'm running the ibmcom/ibm-fhir-server:4.3.0
container.
Lee Surprenant (Jun 26 2020 at 19:51):
Hi Christian, I would have expected that tracespecification to work (although the *=all
might be a bit much)...let me double-check locally that *=all
isn't getting in the way
Lee Surprenant (Jun 26 2020 at 19:53):
quick question (and either should be fine)...did you replace the default server.xml or did you override it by using the "configDropins" mechanism described at https://hub.docker.com/r/ibmcom/ibm-fhir-server ?
Lee Surprenant (Jun 26 2020 at 19:56):
also, are you trying to log to console (e.g. to get the logs from docker) or to a file (mounted or not) within the container?
Lee Surprenant (Jun 26 2020 at 20:05):
for example, for our cloud deploy we set these env vars so that the logs go to console instead of the default /logs
directory within the container: https://access.redhat.com/documentation/en-us/open_liberty/2020/html/open_liberty_runtime_guide/logging_and_tracing#configuring_logging_for_a_docker_image
Paul Bastide (Jun 26 2020 at 20:20):
Christian Gulden said:
Apologies if this is a very basic question, but I can't figure out how to increase the log verbosity. Setting
<logging traceSpecification="*=all:com.ibm.fhir.*=all" />
in server.xml didn't seem to to the trick. I'm running theibmcom/ibm-fhir-server:4.3.0
container.
*=all: actually buries the system. You'll get a ton of info into the trace.log
Paul Bastide (Jun 26 2020 at 20:21):
What I typically do, is AFTER startup, and PRIOR to executing a request, I turn on *=all, and turn off before I need to shutdown
Paul Bastide (Jun 26 2020 at 20:21):
I try to use sparingly
Christian Gulden (Jun 26 2020 at 23:28):
Lee Surprenant said:
quick question (and either should be fine)...did you replace the default server.xml or did you override it by using the "configDropins" mechanism described at https://hub.docker.com/r/ibmcom/ibm-fhir-server ?
I used to replace the default server.xml, but using custom overrides seems cleaner, thanks for the tip!
Btw, there's a typo in the docker hub README: /opt/ol/wlp/usr/servers/fhir-server/configDropins/overr__r__ides
.
Christian Gulden (Jun 26 2020 at 23:30):
Lee Surprenant said:
for example, for our cloud deploy we set these env vars so that the logs go to console instead of the default
/logs
directory within the container: https://access.redhat.com/documentation/en-us/open_liberty/2020/html/open_liberty_runtime_guide/logging_and_tracing#configuring_logging_for_a_docker_image
Perfect, thank you! Setting:
environment:
WLP_LOGGING_MESSAGE_FORMAT: json
WLP_LOGGING_CONSOLE_FORMAT: json
WLP_LOGGING_CONSOLE_LOGLEVEL: info
WLP_LOGGING_CONSOLE_SOURCE: message,trace,accessLog,ffdc,audit
on the compose file logs to stdout in json.
Christian Gulden (Jun 26 2020 at 23:33):
Paul Bastide said:
I try to use sparingly
I can definitely see why, I think I'll stick with "info" for now but remember your approach to temporarily increase it - hot reloading of config files is pretty neat.
Paul Bastide (Jun 28 2020 at 23:53):
Fixed the spelling mistake
Last updated: Apr 12 2022 at 19:14 UTC