Onto-Med / top-backend

Spring Boot based backend of the TOP Framework
MIT License
0 stars 1 forks source link

Reduce log level for missing adapter warnings #203

Closed ChristophB closed 8 months ago

KonradHoeffner commented 8 months ago

Testing this as usual with a rebase on the https://github.com/konradhoeffner/top-modules fork and I still get the warning:

modules$ docker compose logs backend | grep adapter
backend-1  | 2024-03-04 08:12:04.819  WARN 1 --- [           main] c.s.t.b.c.nlp.DocumentQueryConfigMap     : Could not load text adapter configs from dir 'config/data_sources/nlp'. Using default adapter settings.

However I will investigate whether this is some caching issue.

KonradHoeffner commented 8 months ago

It seems to me as if one of the adapter messages is still on log level "warning":

top-backend$ ack "Could not load " -B 2                                                                                                                   tmp
src/main/java/care/smith/top/backend/service/PhenotypeQueryService.java
158-    } catch (Exception e) {
159-      LOGGER.fine(
160:          String.format("Could not load data adapter configs from dir '%s'.", dataSourceConfigDir));

src/main/java/care/smith/top/backend/service/nlp/DocumentQueryService.java
176-    } catch (Exception e) {
177-      LOGGER.fine(
178:          String.format("Could not load text adapter configs from dir '%s'.", dataSourceConfigDir));

src/main/java/care/smith/top/backend/configuration/nlp/DocumentQueryConfigMap.java
175-      LOGGER.warning(
176-          String.format(
177:              "Could not load text adapter configs from dir '%s'. Using default adapter settings.",
KonradHoeffner commented 8 months ago

@ChristophB: Added a commit to reduce those log levels accordingly.

ChristophB commented 8 months ago

DocumentQueryConfigMap.java will be removed with the upcoming changes to the document search.