Create an abstraction for a LoggingContext containing request properties
See original GitHub issueCurrently, armeria natively exports many useful attributes to logback logs
But since these are hard-coded into the logback implementation itself, it can’t be reused for log4j users. Could we add to a RequestContext
a layer that accumulates key/value pair that logging layers can read without special processing?
Here is a similar idea, but misses out on armeria’s built-in logging, which would be very tedious to duplicate.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
LoggingContext Class - PostSharp 6.10 Documentation
Gets the LogEventData (i.e. the source of logging properties) associated with the current LoggingContext. Public property, HierarchicalContextIdInfo. Exposes ...
Read more >Spring Boot Logging Best Practices Guide - Coralogix
We've looked at how most logging concerns (formatting, destinations, cross-cutting logging, context and unit tests) can be abstracted away from ...
Read more >Conversation Logging - JAICF documentation
This abstraction enables you to hide sensitive data before it's logged. ... Once request is processed and all reactions are created, JAICF obfuscates...
Read more >Contextual Logging in NodeJS - Xebia
These serverless alternatives often go hand in hand with NodeJS. ... Let's create a little ExpressJS application written in TypeScript to ...
Read more >netcommon-developer Mailing List for Common Infrastructure ...
I have implemented logging context abstractions for NLog and log4net (and also for ... for the logical properties to be propagated along the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Perhaps we could clean up the common export logic a little bit and move it to
armeria.common
or into a utility method ofRequestContext
? e.g.Map<String, String> ctx.exportProperties(...properties to export...)
RequestContext
already extendsAttributeMap
which overlaps with it to some extent. How about replacingAttributMap
with our own interface which defines a key which tells if its value needs to be exported to logging framework or to the String representation ofRequestContext
? e.g.The groundwork for adding support for Log4J2 is now done.