kafbat / kafka-ui

Open-Source Web UI for managing Apache Kafka clusters
http://ui.docs.kafbat.io
Apache License 2.0
390 stars 31 forks source link

BE: Logging level overriding doesn't work #458

Open abryant710 opened 1 week ago

abryant710 commented 1 week ago

Issue submitter TODO list

Describe the bug (actual behavior)

I am still seeing DEBUG logging in the container logs, despite setting the correct environment variables to reduce the logging.

Expected behavior

DEBUG logging should disappear when the correct configuration is given to the container

Your installation details

Docker compose project with the following settings used:

kafka-ui:
    image: ghcr.io/kafbat/kafka-ui:latest
    ...
    environment:
      ...
      LOGGING_LEVEL_IO_KAFBAT: error
      LOGGING_LEVEL_ROOT: error
    expose:
      - 8080
    logging:
      driver: json-file

Steps to reproduce

Start docker compose project with

kafka-ui: image: ghcr.io/kafbat/kafka-ui:latest

and view the logs.

Screenshots

No response

Logs

2024-06-26 12:18:24 Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts
2024-06-26 12:18:25 default THREAD FACTORY
2024-06-26 12:18:25  _   _ ___    __             _                _          _  __      __ _
2024-06-26 12:18:25 | | | |_ _|  / _|___ _ _    /_\  _ __ __ _ __| |_  ___  | |/ /__ _ / _| |_____
2024-06-26 12:18:25 | |_| || |  |  _/ _ | '_|  / _ \| '_ / _` / _| ' \/ -_) | ' </ _` |  _| / / _`|
2024-06-26 12:18:25  \___/|___| |_| \___|_|   /_/ \_| .__\__,_\__|_||_\___| |_|\_\__,_|_| |_\_\__,|
2024-06-26 12:18:25                                  |_|                                             
2024-06-26 12:18:25 
2024-06-26 12:18:25 2024-06-26 11:18:25,831 INFO  [main] i.k.u.KafkaUiApplication: Starting KafkaUiApplication using Java 17.0.10 with PID 1 (/api.jar started by kafkaui in /)
2024-06-26 12:18:25 2024-06-26 11:18:25,833 DEBUG [main] i.k.u.KafkaUiApplication: Running with Spring Boot v3.1.9, Spring v6.0.17
2024-06-26 12:18:25 2024-06-26 11:18:25,834 INFO  [main] i.k.u.KafkaUiApplication: No active profile set, falling back to 1 default profile: "default"
2024-06-26 12:18:28 2024-06-26 11:18:28,707 DEBUG [main] i.k.u.s.SerdesInitializer: Configuring serdes for cluster local
2024-06-26 12:18:29 2024-06-26 11:18:29,431 INFO  [main] i.k.u.c.a.BasicAuthSecurityConfig: Configuring LOGIN_FORM authentication.
2024-06-26 12:18:30 2024-06-26 11:18:30,377 INFO  [main] i.k.u.KafkaUiApplication: Started KafkaUiApplication in 5.17 seconds (process running for 5.769)
2024-06-26 12:18:30 2024-06-26 11:18:30,496 DEBUG [parallel-2] i.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: local
2024-06-26 12:18:31 2024-06-26 11:18:31,201 DEBUG [parallel-12] i.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: local
2024-06-26 12:19:00 2024-06-26 11:19:00,373 DEBUG [parallel-7] i.k.u.s.ClustersStatisticsScheduler: Start getting metrics for kafkaCluster: local
2024-06-26 12:19:00 2024-06-26 11:19:00,394 DEBUG [parallel-14] i.k.u.s.ClustersStatisticsScheduler: Metrics updated for cluster: local

Additional context

No response

Haarolean commented 1 week ago

Hi, setting LOGGING_LEVEL_IO_KAFBAT_UI: ERROR should help. The question why the higher level io.kafbat property doesn't work remains. Might be an issue with property source overriding priority.

abryant710 commented 1 week ago

@Haarolean . I have tested and that property does seem to work to remove DEBUG statements. Thanks.

I'm happy for you to close the ticket based on the results of my testing.