Closed krebsr closed 2 years ago
Hi,
thanks for submitting this issue. You can accomplish those requirements with a TurboFilter when using logback or a Filter when using log4j2. Check out some examples from this library: DynamicLevelPrefixLoggerTurboFilter for logback or DynamicLevelPrefixLoggerFilter for log4j2. These filters are executed for every log event. If you can determine your tenant from the log event alone, you can implement your required logic in such a filter. Alternatively you can use the Dynamic Log Level Feature of this library by providing suitable JWT tokens in the requests of all your tenants you want debug logs for. If you do not want to use JWT, you can still instruct the filters from above to apply different log levels by setting the two MDC fields dynamic_log_level
and dynamic_log_level_prefixes
as documented in the extension section of the documentation. This could be done by the code identifying your tenants.
Please let me know, how I can help you.
Best Regards, Karsten
Closing due to lack of response.
Hi,
As a Developer, Quality Engineer or Operations Experts I want to set the log level on a tenants individual basis in order to debug issues reported for one tenant only.
This allows me to:
Optional: As a Developer, Quality Engineer or Operations Experts I want to set the log level on a tenants individual basis at runtime without restarting any service instances, in order to avoid unexpected service interruptions
Thanks in advance