tchiotludo / akhq

Kafka GUI for Apache Kafka to manage topics, topics data, consumers group, schema registry, connect and more...
https://akhq.io/
Apache License 2.0
3.3k stars 638 forks source link

Access log format customization #244

Open clallavena opened 4 years ago

clallavena commented 4 years ago

Hi, I currently trying to understand the operation of the Logs into KafkaHQ in a purpose to try to add some features.

I'm using the docker image of KFKHQ and the logs from it seems to works fine, but it's the logs from /loggers path which seems not to work properly.

image

Here what i've got when I try to access the /loggers endpoints. And I've got the same issues when i'm trying to access it with the curl command.

I obviously made something wrong but I can't figure it out.

tchiotludo commented 4 years ago

Sorry don't be sure to understand your question.

/loggers endpoint only allow to see and configure the log level of each loggers registered. See more here : https://docs.micronaut.io/latest/guide/index.html#loggersEndpoint

It's a raw micronaut feature without any modification from kafkahq and it's working well.

clallavena commented 4 years ago

Ho ok i've just made it up, something wasn't clear in my thought. Thank you !

My first part of the issues was that I would like to modify the log in KFKHQ to add the display of the username instead of the display of the IP.

image

Having the username (if exists) instead of the IP.

Where can i look to modify this part?

tchiotludo commented 4 years ago

the entry point is here : org.kafkahq.middlewares.HttpServerAccessLogHandler I would like to have a more powerful access log (and customizable for configuration) but I don't find a proper way for now. PR are welcome