Skip to content

KotlinLoggingConfiguration is not accessible on nativeMain #494

@sureshg

Description

@sureshg

I'm developing a Kotlin Native CLI application where most of the code is in the nativeMain source set. This code depends on a shared module, which uses the io.github.oshai.kotlinlogging library in its commonMain source set.

I need to configure the logging specifically for the native target (e.g., add a FileAppender, change log levels). It seems the way to do this might be through KotlinLoggingConfiguration. However, I can't seem to access or configure this from my nativeMain code – KotlinLoggingConfiguration isn't resolving in the IDE within that context.

Image

Does it make sense to move this configuration class to commonMain instead of defining in the directMain intermediate sourceset Or is there a standard way to handle native-specific logger configuration within nativeMain itself?

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