src/Pure/General/logger.scala
changeset 73340 0ffcad1f6130
parent 65921 5b42937d3b2d
child 73777 52e43a93d51f
equal deleted inserted replaced
73339:9efdebe24c65 73340:0ffcad1f6130
    21     Timing.timeit(message, enabled, apply(_))(e)
    21     Timing.timeit(message, enabled, apply(_))(e)
    22 }
    22 }
    23 
    23 
    24 object No_Logger extends Logger
    24 object No_Logger extends Logger
    25 {
    25 {
    26   def apply(msg: => String) { }
    26   def apply(msg: => String): Unit = {}
    27 }
    27 }
    28 
    28 
    29 class File_Logger(path: Path) extends Logger
    29 class File_Logger(path: Path) extends Logger
    30 {
    30 {
    31   def apply(msg: => String) { synchronized { File.append(path, msg + "\n") } }
    31   def apply(msg: => String): Unit = synchronized { File.append(path, msg + "\n") }
    32 
    32 
    33   override def toString: String = path.toString
    33   override def toString: String = path.toString
    34 }
    34 }