Added manual log calls for testing

pull/960/head
Morgan Pretty 11 months ago
parent 9e5a938d6f
commit 47001b754d

@ -1 +1 @@
Subproject commit 091b58f134bb48377a9cf93b905b6235d54d6581
Subproject commit 6744a7de2fdfcca739d7cda75f96a16d6e455914

@ -321,6 +321,8 @@ public extension LibSession {
LibSession.updatePaths(cPathsPtr: pathsPtr, pathsLen: pathsLen)
}, nil)
session_manual_log("Log after network init".cArray.nullTerminated())
cachedNetwork = network
return network
}

@ -19,12 +19,15 @@ public enum LibSession {
extension LibSession {
public static func addLogger() {
// Set the desired log levels first
// Set the default log level first (in case something has a warning or error)
session_logger_set_level_default(LOG_LEVEL_WARN)
// Then set any explicit category log levels we have
logLevels.forEach { cat, level in
session_logger_set_level(cat.rawValue.cArray, level)
}
// Add the logger
// Finally register the actual logger callback
session_add_logger_full({ msgPtr, msgLen, _, _, lvl in
guard let msg: String = String(pointer: msgPtr, length: msgLen, encoding: .utf8) else { return }
@ -44,6 +47,7 @@ extension LibSession {
print(trimmedLog)
#endif
})
session_manual_log("Test after logger added".cArray.nullTerminated())
}
// MARK: - Internal

Loading…
Cancel
Save