Skip to content

JVM: logger for the inner class has the name as a parent class #495

@scrat98

Description

@scrat98

In JVM, logger for the inner class has the name as a parent class.

I think it should be documented at least. Or fixed if required.

Example:

class Base {
  class Inner {
    private companion object {
      private val logger = KotlinLogging.logger { }
    }

    init {
      logger.info { "Hello" }
    }
  }
}

fun main() {
  Base.Inner()
}
18:28:14.314 [main] INFO  io.github.oshai.kotlinlogging.internal.Base - Hello

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