kafbat / kafka-ui

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

Disable Color Coding for Logging #243

Open metropolis-ameer opened 7 months ago

metropolis-ameer commented 7 months ago

Issue submitter TODO list

Is your proposal related to a problem?

Cloudwatch doesn't support color logging which makes it more difficult to read. My logs currently look like this 2024-03-15 16:48:08,793 DEBUG [parallel-2] c.p.k.u.s.ClustersStatisticsScheduler: Start getting metrics for

Describe the feature you're interested in

Disable logging colors through the config.yaml

Describe alternatives you've considered

No response

Version you're running

2956664

Additional context

No response

github-actions[bot] commented 7 months ago

Hello there metropolis-ameer! 👋

Thank you and congratulations 🎉 for opening your very first issue in this project! 💖

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. 👀

Haarolean commented 7 months ago

Currently, adjusting logging properties is kinda complicated for an end user, which has to configure logback via an external file. TODO:

  1. Think about better ways to provide customization capabilities for logback without a need to provide external files
greyfairer commented 3 months ago

We're deploying this on Google Kubernetes Engine, which also doesn't support colored output.

The root cause is the custom logback-spring.xml, which I don't think is necessary.

I've tried working around it with setting an environment variable: LOGGING_CONFIG=/etc/kafkaui/logback-cloud.xml

And providing a logback config with an uncolored pattern:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{ISO8601} %-5level %t %c{1}: %msg%n%throwable</pattern>
        </encoder>
    </appender>
    <root level="info">
        <appender-ref ref="STDOUT"/>
    </root>
</configuration>

But that doesn't work, I assume it's because the logback-spring.xml is still there?