diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/sys/process/ProcessLogger.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/library/scala/sys/process/ProcessLogger.scala b/src/library/scala/sys/process/ProcessLogger.scala index b3e698e160..309c9ef2b5 100644 --- a/src/library/scala/sys/process/ProcessLogger.scala +++ b/src/library/scala/sys/process/ProcessLogger.scala @@ -14,3 +14,11 @@ trait ProcessLogger { def error(s: => String): Unit def buffer[T](f: => T): T } + +object ProcessLogger { + def apply(fn: String => Unit): ProcessLogger = new ProcessLogger { + def info(s: => String): Unit = fn(s) + def error(s: => String): Unit = fn(s) + def buffer[T](f: => T): T = f + } +} |