diff options
author | Paul Phillips <paulp@improving.org> | 2011-01-20 16:19:51 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-01-20 16:19:51 +0000 |
commit | 919d4e1f3163496d725f7731d2ccd30d47ecee82 (patch) | |
tree | 2840a615f85a1332c8f3ed6d2238c2c433240b26 /src/library | |
parent | 161a4fda3967b3b496d6afc98e285d4f5220998c (diff) | |
download | scala-919d4e1f3163496d725f7731d2ccd30d47ecee82.tar.gz scala-919d4e1f3163496d725f7731d2ccd30d47ecee82.tar.bz2 scala-919d4e1f3163496d725f7731d2ccd30d47ecee82.zip |
Duplication elimination, no review.
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 + } +} |