Comments (4)
Can you explain your use case for a custom logger?
from scala-logging.
In my project in some classes I need to wrap all logger calls with MDC.put
and MDC.remove
calls. It would be cool if I will have a possibility to add this boilerplate calls inside custom logger.
from scala-logging.
We have a similar situation in our project. We have a custom ThrottledLogger extends Logger - the old trait which is available in version 2.1.2.
All classes use that trait and we can choose to supply normal or throttled logger.
Now that trait has gone in the latest version, there is no common trait to use unless we hand crank our own version.
from scala-logging.
Via Patrick Premont: I think this wouldn’t help those who want to override the macros. They would need to ensure their subclass is used explicitly everywhere. Any reference to the base class would not get the overridden behaviour. So it would be safer for their type not to extend Logger, to avoid such accidents. I created a gist to highlight the compile-time dispatch that occurs with the macro override: https://gist.github.com/patrick-premont/01c5847958e1776d7748bb9570ee376e
from scala-logging.
Related Issues (20)
- request: Declare version scheme / policy HOT 2
- `when***Enabled()` methods are missing in LoggerTakingImplicitImpl HOT 1
- ditch Travis-CI, switch to GitHub Actions
- Unpatched vulnerability - https://jira.qos.ch/browse/LOGBACK-1591 HOT 4
- Logging Macro Doesn't Support Scala2 + Scala3 Simultaneously HOT 2
- Example for AnyLogging
- Example for StrictLogging
- Include a way to create Logger always with the name of the class into which it is defined
- Remove type annotation warnings from test files
- Current release is compiled for Java 8 but requires Java 9 in bundle manifest HOT 7
- Varargs compilation error as of v3.9.5 HOT 3
- Disable logging HOT 1
- Expose the SLF4J2 LoggingEventBuilder "Fluent" API
- Illegal Update to non-static final field - Gradle 7.6 HOT 1
- Fix CVE-2022-36944 for scala 2.13.x before 2.13.9 HOT 15
- String Interpolation Limitations
- Bump slf4j-api dependency to 2.x HOT 3
- New volunteer maintainer(s) needed HOT 9
- Message formatting (interpolation) with last argument of Throwable
- In Scala3, using a non-inline variable-length parameter doesn't print correctly HOT 1
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 scala-logging.