Skip to content
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

consolidate platforms with non-delegating impl #350

Merged
merged 5 commits into from
Aug 10, 2023
Merged

Conversation

oshai
Copy link
Owner

@oshai oshai commented Aug 9, 2023

create directMain source set as base for all non-delegating platforms - platforms that use kotlin-logging to
write the logs with native kotlin functions and not via other libs or platform constructs.

This change the js/linux/etc' platforms. Some duplication was removed. And the way it is now configured changed.
KotlinLoggingConfiguration now contains:

  • logLevel
  • formatter
  • appender

Those interfaces changed. Logger now calls the appender that is responsible to call the formatter - unlike previously where it called the formatter and passed the message to the appender.
Appender don't need to check if log is enabled, and has a single method:
fun log(loggingEvent: KLoggingEvent) (which contains also payload).
Formatter has a single method:
fun formatMessage(loggingEvent: KLoggingEvent): Any? which returns a formatted message.

  • old upper case names in js are now deprecated and delegating to those.

This was referenced Aug 9, 2023
@oshai oshai merged commit 6a3f37c into master Aug 10, 2023
@oshai oshai deleted the mp_abstraction2 branch August 10, 2023 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant