Disable error logs for failed queries

Hi there,

I would like to disable the error logs, when a user executes a query which fails.
E.g. "2021-08-27T12:06:00+02:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: null ..."
I know that I am able to configure the logging through the log4j xml. Would setting the logging level for "metabase.query-processor.async" to "FATAL" be enough to suppress the error logs? What other logs would I miss with that setting?

I am using Metabase v0.39.2 with a PostgreSQL DB v13.2

Thanks a lot for the help!

Hi @Bert
I would like to understand the reason behind this, since it would make it extremely difficult to debug problems.
The namespace is metabase.query-processor.middleware.catch-exceptions, so this should work - example:

java -Dlog4j.configurationFile="https://log4j.us/v2/templates/metabase?fatal=metabase.query-processor.middleware.catch-exceptions" -jar metabase.jar

Hi @flamber

The reason why I would like to disable the logging of failed queries is my monitoring, which notifies me about errors in the Metabase logs. The thing is, that I don't want to get notified everytime a user executes a faulty query, e.g. referencing a table which doesn't exist.
So my preferred solution would be that failed queries get logged as INFO, but that is probably a bit out of scope ;-).
For debugging such failed queries I can use the logs from the DB which logs them as well.

The more important question to me would be, if I would miss any other log messages, which indicate a "real" problem.

Thanks a lot for the help and the example, I will give it a try.

@Bert I would probably keep getting the logs, but setup a filter in your monitoring, which silence anything from that namespace, which contains some specific string like ERROR: relation \".*\" does not exist\n Position

Then you still have statistics over how often this happens, which might help you with guiding the users more or catch other problems that might occur.

I know that you can do a lot of stuff with Log4j, but I normally log everything and then filter in monitoring.

Thank you for the suggestion, it is much appreciated.

I had a discussion with my team and we decided to disable the logging for now. Besides the alarm there is also the potential issue of logging personal data, which are part of some of the queries.

Again a big thank you for the support!