Stream: cql
Topic: turn off logging for cql?
Sean McIlvenna (Jul 28 2021 at 05:05):
On larger measures with larger quantities of patients, it seems that the system produces MANY mb's of logs very quickly.
- Do you think this impacts performance?
- Is there a way to turn off the detailed logging?
JP (Jul 28 2021 at 15:31):
There's not currently a way to turn off the detailed logging. There needed to be some changes in the upstream Java cql-engine to facilitate that and they are done, but haven't been released yet.
Sean McIlvenna (Jul 28 2021 at 15:58):
Any thoughts on the performance impacts? Think the excessive logging causes performance degredation at a larger scale?>
JP (Jul 28 2021 at 17:40):
I think it's really dependent upon your specific logging implementation. You could hypothetically redirect logging to /dev/null
and just send all the logs to the void which would cause little performance impact. If on the other hand you're sticking all the logs into a transactional db, it'd probably slow you down a bunch.
Sean McIlvenna (Jul 28 2021 at 17:49):
In my scenario, the logs aren't being recorded to a db, but they are within a kubernetes deployment, and kubernetes keeps all logs
Sean McIlvenna (Jul 28 2021 at 17:49):
So, might be slowing the k8s cluster down persisting all the logs
JP (Jul 28 2021 at 17:55):
FWIW, making that configurable is high-priority item for the round of work once cql-engine 1.5.2 is released.
Corey Sanders (Jul 29 2021 at 14:17):
@JP I might be missing some context here, but can't the CQL Engine logging already be controlled via the DebugMap that is passed as input to the CQLEngine / Context? We had a similar problem that we overcame using DebugMap.setIsLoggingEnabled(false).
The DebugMap logging is hard-coded to true in the CQF Ruler MeasureEvaluationSeed, but it could be disabled with existing features I think.
JP (Jul 29 2021 at 16:08):
I could be mistaken, but last I knew @Sean McIlvenna was using HAPI FHIR server as opposed to the cqf-ruler. HAPI is slightly behind the cqf-ruler as of this moment. cql-engine 1.5.2-SNAPSHOT also uses a logging framework as opposed to writing to stdout making log management easier.
Sean McIlvenna (Jul 29 2021 at 16:44):
You around correct @JP
Corey Sanders (Jul 29 2021 at 17:02):
Ok, yeah. HAPI FHIR has that same hard-coded value set to true. https://github.com/hapifhir/hapi-fhir/blob/1b9761c91b8cab8c8fa8c7766192a67c04edc105/hapi-fhir-jpaserver-cql/src/main/java/ca/uhn/fhir/cql/r4/evaluation/MeasureEvaluationSeed.java#L135
Last updated: Apr 12 2022 at 19:14 UTC