All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.odin.meta.Position.scala Maven / Gradle / Ivy

package io.odin.meta

/**
  * Position of log invocation
  */
case class Position(
    fileName: String,
    enclosureName: String,
    packageName: String,
    line: Int
)

object Position {
  implicit def derivePosition(
      implicit fileName: sourcecode.File,
      enclosureName: sourcecode.Enclosing,
      packageName: sourcecode.Pkg,
      line: sourcecode.Line
  ): Position =
    Position(
      fileName = fileName.value,
      enclosureName = enclosureName.value,
      packageName = packageName.value,
      line = line.value
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy