Structured logging (#831)

* Structured logging support

* Bump the SDK, fix breaking changes

* Enabled more logging of timeline diffs

* Keep only source file last path components in logs

* Bump the SDK, tweaks following code review
This commit is contained in:
Stefan Ceriu
2023-04-25 14:48:20 +03:00
committed by GitHub
parent 0d3e823b69
commit be8adb19b5
20 changed files with 286 additions and 252 deletions
+1 -18
View File
@@ -81,24 +81,7 @@ class NSELogger {
}
isConfigured = true
let configuration = MXLogConfiguration()
configuration.maxLogFilesCount = 10
configuration.subLogName = "nse"
#if DEBUG
setupTracing(configuration: .debug)
configuration.logLevel = .debug
#else
setupTracing(configuration: .release)
configuration.logLevel = .info
#endif
// Avoid redirecting NSLogs to files if we are attached to a debugger.
if isatty(STDERR_FILENO) == 0 {
configuration.redirectLogsToFiles = true
}
MXLog.configure(configuration)
MXLog.configure(target: "nse")
}
static func logMemory(with tag: String) {