loki4j / loki-logback-appender

Fast and lightweight implementation of Logback appender for Grafana Loki
https://loki4j.github.io/loki-logback-appender/
BSD 2-Clause "Simplified" License
317 stars 27 forks source link

feature-request: Allow setting format.message.mdc.fieldName to an empty string. #264

Open apollo13 opened 1 month ago

apollo13 commented 1 month ago

I'd love to set format.message.mdc.fieldName to an empty string. I have tried setting it to <fieldName></fieldName> but I am still ending up with an mdc_ prefix. Did I get the config wrong or is it not possible to unset the prefix completely?

nehaev commented 1 month ago

Thanks for reporting this, @apollo13!

Looks like logback configuration system (joran) ignores empty values. Probably we would need to introduce a special property to signal that no prefix is needed.

apollo13 commented 1 month ago

That would be great :+1: