Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
435 views
in Technique[技术] by (71.8m points)

mdc - How to use RequestContext custom attributes of armeria in log4j2.xml configuration?

I'm using log4j2 2.14.0 with armeria 1.3.0. According to the armeria documentation, I could see RequestContext custom atrributes can be exported using com.linecorp.armeria.common.logback.RequestContextExportingAppender in logback configuration. So, I tried to configure it in log4j2.xml but it didn't work. Is there any way to use the atrributes for setting %X{some_value} in log4j2.xml ? or Is it possible to use ThreadContext(like MDC) with armeria ?

question from:https://stackoverflow.com/questions/66059286/how-to-use-requestcontext-custom-attributes-of-armeria-in-log4j2-xml-configurati

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Armeria currently doesn't have the Log4J2 version of RequestContextExportingAppender yet. Please stay tuned by subscribing to this GitHub issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...