-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom logger #46
Comments
Can you explain your use case for a custom logger? |
In my project in some classes I need to wrap all logger calls with |
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. Now that trait has gone in the latest version, there is no common trait to use unless we hand crank our own version. |
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 |
In my project I want to have custom logger, based on scala-logging
Logger
class. But for now there is no possibility to create custom logger.Logger
class is final and with private construstor.I have tried some experiments in fork, but macroses makes all inheritance stuff very complicated.
The text was updated successfully, but these errors were encountered: