Expose formatter to public or protected in CommonWriter
https://github.com/touchlab/Kermit/blob/8e20fa506771c5078b55c0a32ef93e2889aba10e/kermit-core/src/commonMain/kotlin/co/touchlab/kermit/CommonWriter.kt#L19 At now CommonWriter's formatter is private, which make it impossible to use custom formatter when inheriting writer. See below
class MyWriter() : CommonWriter(MyFormatter()) {
override fun log(severity: Severity, message: String, tag: String, throwable: Throwable?) =
// Cannot access 'messageStringFormatter': it is invisible (private in a supertype)
Mylog.log(messageStringFormatter.formatMessage(severity, Tag(tag), Message(message)))
}
It's possible to customize Message Formatting. Did you check out this docs? https://kermit.touchlab.co/docs/configuration/MESSAGE_FORMATTING
It's possible to customize Message Formatting. Did you check out this docs? https://kermit.touchlab.co/docs/configuration/MESSAGE_FORMATTING
Yes, I know the current way to customize log writer. And I also successfully implement my own writer. But if we implement a class to inherit CommonWriter, providing customization by overriding base log method seems to be pointless. Because the inheritor cannot access the formatter.