Skip to content

How to make a custom logger? #21

@dhiraj

Description

@dhiraj

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? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions