Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger and thread name labels for logback appender. #107

Closed
jeantil opened this issue Mar 9, 2023 · 1 comment · Fixed by #108
Closed

Logger and thread name labels for logback appender. #107

jeantil opened this issue Mar 9, 2023 · 1 comment · Fixed by #108

Comments

@jeantil
Copy link
Contributor

jeantil commented Mar 9, 2023

Hello,

I am trying to get a logger and thread labels using the logback appender.
It looks like it is possible for log4j using log4j patterns (requested in #56 and introduced in #62) but not in logback.

I have found the predefined level label, I managed to have labels sourced from environment such as

<label>
 <name>server</name>
 <value>${HOSTNAME}</value>
</label>

I also have mdc labels

<mdcLogLabel>
  host
</mdcLogLabel>

but none of these allow me to tag the log line with logger or thread name.

Looking at the definition of ch.qos.logback.classic.spi.ILoggingEvent, both properties are information at the same level as loglevel

@tkowalcz
Copy link
Owner

Thank you for a thorough analysis and code contribution. Please allow me a few day to investigate it and evaluate the PR. Much appreciated.

tkowalcz added a commit that referenced this issue Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants