Commit 6e7a8db5 authored by Johannes Schriewer's avatar Johannes Schriewer

Move tty test into colorize function

parent fbe53e29
......@@ -50,6 +50,11 @@ public extension LoggerProcotol {
/// - parameter stream: file stream to write to
/// - parameter level: level to fetch to color for, set to `nil` to reset color
internal func colorize(_ stream: UnsafeMutablePointer<FILE>, _ level: Log.LogLevel?) {
let tty = isatty(fileno(stderr)) != 0
if !tty {
return
}
var color: String
if let level = level {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment