Comments (1)
Before answering your question, I have the impression that what you are after can be (and maybe should be?) done at the sink level. That is, assume your log sink is an Elasticsearch cluster. Why don't you count the calls there? If you can elaborate on your use case, I think we can help better.
Extending loggers is not the way you intercept Log4j. You can implement either a filter or an appender (that wraps your actual appender) and there you can extract statistics that suit your need.
You can check out FailoverAppender
docs and FailoverAppender.java
for inspiration.
from logging-log4j-kotlin.
Related Issues (12)
- Add an extension property for storing a cached logger
- Add facade APIs for manipulating the context map and stack
- Update baseline Kotlin requirement to Kotlin 1.4 HOT 1
- catching() is missing in KotlinLogger HOT 1
- Navigation menu icons are missing HOT 2
- Support LogBuilder API in a kotlin-y way
- Update baseline Kotlin requirement to Kotlin 1.6 HOT 1
- Add a type-safe Kotlin configuration builder API HOT 6
- Coroutine context is not cleared properly
- Support Kotlin multi-platform HOT 1
- Thread/coroutine context is more verbose than necessary
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logging-log4j-kotlin.