I'd like to make a custom logger that would log to a new target, specifically in my case Firebase Crashlytics. Looking at ConsoleLogger which inherits from BaseLogger, I would think that all I needed to do would be to define my own CrashlyticsLogger with an overridden log() function.
However, since the BaseLogger class is defined as public instead of open I'm not able to do so, with the compiler error: Cannot inherit from non-open class 'ConsoleLogger' outside of its defining module.
Is there some other mechanism that I should be using to make custom loggers? 🤔
I'd like to make a custom logger that would log to a new target, specifically in my case Firebase Crashlytics. Looking at
ConsoleLoggerwhich inherits fromBaseLogger, I would think that all I needed to do would be to define my ownCrashlyticsLoggerwith an overriddenlog()function.However, since the
BaseLoggerclass is defined aspublicinstead ofopenI'm not able to do so, with the compiler error:Cannot inherit from non-open class 'ConsoleLogger' outside of its defining module.Is there some other mechanism that I should be using to make custom loggers? 🤔