最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - SpringBoot: External Libs use their Loggers but project has a Custom Logging Library implemented - Stack Overflow

programmeradmin5浏览0评论

I am working on a big project that uses a custom built logger library. Multiple microservices are using the same logger libary. All the logs printed in the console are of json type. These logs have some specific fields added to the json payload using the custom logger lib.

I am connecting to mongodb, kafka, websocket etc using external jars. They mostly use .slf4. The logs printed by these external libraries are in json format but the additional properties are not added as they depend on simple loggers.

Is there a way to intercept and enrich logs or whatever is printed in the console. I need to add my project specific properties to these logs as well.

Trying to find a way to intercept the logs before being printed on the console.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论