Files
amnezia-client/client/platforms/ios/LogController.swift
T

27 lines
508 B
Swift
Raw Normal View History

2024-02-10 19:44:55 +03:00
import Foundation
public func swiftUpdateLogData(_ qtString: std.string) -> std.string {
let qtLog = Log(String(describing: qtString))
var log = qtLog
if let neLog = Log(at: Log.neLogURL) {
neLog.records.forEach {
log.records.append($0)
}
2024-02-11 01:55:54 +03:00
2024-02-10 19:44:55 +03:00
log.records.sort {
$0.date < $1.date
}
}
2024-02-11 01:55:54 +03:00
2024-02-10 19:44:55 +03:00
return std.string(log.description)
}
public func swiftDeleteLog() {
Log.clear(at: Log.neLogURL)
}
public func toggleLogging(_ isEnabled: Bool) {
Log.isLoggingEnabled = isEnabled
}