mirror of https://github.com/sbt/sbt.git
cleanup, add regex for escape sequences to be used later
This commit is contained in:
parent
85ad0c023e
commit
2cbc755856
|
|
@ -5,7 +5,7 @@ package sbt
|
|||
|
||||
import java.io.File
|
||||
import Project.{ScopedKey, Setting}
|
||||
import Keys.{globalLogging, streams, Streams, TaskStreams}
|
||||
import Keys.{streams, Streams, TaskStreams}
|
||||
import Keys.{dummyState, dummyStreamsManager, streamsManager, taskDefinitionKey, transformState}
|
||||
import Scope.{GlobalScope, ThisScope}
|
||||
import Types.const
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@ object ConsoleLogger
|
|||
def apply(out: PrintWriter): ConsoleLogger = apply(printWriterOut(out))
|
||||
def apply(out: ConsoleOut, ansiCodesSupported: Boolean = formatEnabled, useColor: Boolean = formatEnabled): ConsoleLogger =
|
||||
new ConsoleLogger(out, ansiCodesSupported, useColor)
|
||||
|
||||
private[this] val EscapeSequence = (27.toChar + "[^@-~]*[@-~]").r
|
||||
def stripEscapeSequences(s: String): String =
|
||||
EscapeSequence.pattern.matcher(s).replaceAll("")
|
||||
}
|
||||
|
||||
/** A logger that logs to the console. On supported systems, the level labels are
|
||||
|
|
|
|||
Loading…
Reference in New Issue