Tweak log format and benchmark messages

This commit is contained in:
Stefan Ceriu
2022-04-12 11:30:12 +03:00
parent 078dcf255b
commit d2089f2c7a
2 changed files with 4 additions and 6 deletions

View File

@@ -22,9 +22,7 @@ struct Benchmark {
trackingIdentifiers[identifier] = startTime
if let message = message {
MXLog.verbose(" Tracking \(identifier). \(message).")
} else {
MXLog.verbose("⏰ Tracking \(identifier).")
MXLog.verbose("\(message).")
}
}
@@ -40,9 +38,9 @@ struct Benchmark {
let elapsedTime = CFAbsoluteTimeGetCurrent() - start
if let message = message {
MXLog.verbose(" Tracking \(identifier). \(message). Elapsed time: \(elapsedTime.round(to: 4)) seconds.")
MXLog.verbose("\(message). Elapsed time: \(elapsedTime.round(to: 4)) seconds.")
} else {
MXLog.verbose(" Tracking \(identifier). Elapsed time: \(elapsedTime.round(to: 4)) seconds.")
MXLog.verbose("⏰ Elapsed time: \(elapsedTime.round(to: 4)) seconds.")
}
}

View File

@@ -151,7 +151,7 @@ private var logger: SwiftyBeaver.Type = {
let consoleDestination = ConsoleDestination()
consoleDestination.useNSLog = true
consoleDestination.asynchronously = false
consoleDestination.format = "$N.$F:$l $M"
consoleDestination.format = "$M"
consoleDestination.levelColor.verbose = ""
consoleDestination.levelColor.debug = ""
consoleDestination.levelColor.info = ""