package de.qwertyuiop.copret

object logger:
  import java.util.logging.*
  val log = Logger.getLogger("copret")
  val fh  = FileHandler("/tmp/copret.log")
  log.addHandler(fh)
  log.setUseParentHandlers(false)
  System.setProperty(
    "java.util.logging.SimpleFormatter.format",
    "%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS.%1$tN %1$Tp %2$s: %4$s: %5$s%6$s%n",
  )
  fh.setFormatter(new SimpleFormatter())
  fh.setLevel(Level.ALL)

  export log.*
