Skip to content

Commit

Permalink
Add white to terminator
Browse files Browse the repository at this point in the history
  • Loading branch information
EricRabil committed Sep 1, 2021
1 parent c8a9223 commit 0be9823
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/Swog/Drivers/Console/ConsoleDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ public extension BackportedOSLogMessage {
}
}

private let terminator = "\n".white

internal extension ConsoleDriver {
@_transparent
@_optimize(speed)
func _log(level: LoggingLevel, category: String, message: String) {
let text = level.color(text: "[\(category.padding(toLength: 20, withPad: " ", startingAt: 0).prefix(20))] \(level.printText) \(message)\n")
let text = level.color(text: "[\(category.padding(toLength: 20, withPad: " ", startingAt: 0).prefix(20))] \(level.printText) \(message)" + terminator)

flockfile(stdout)
fwrite(text, 1, text.utf8.count, stdout)
Expand Down

0 comments on commit 0be9823

Please sign in to comment.