mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 10:02:46 +02:00
setupLogger
This commit is contained in:
@@ -28,6 +28,8 @@ class SampleHandler: RPBroadcastSampleHandler {
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
setupLogger()
|
||||
|
||||
if let connection = SocketConnection(filePath: socketFilePath) {
|
||||
clientConnection = connection
|
||||
setupConnection()
|
||||
@@ -103,4 +105,18 @@ private extension SampleHandler {
|
||||
|
||||
timer.resume()
|
||||
}
|
||||
|
||||
func setupLogger() {
|
||||
let configuration = MXLogConfiguration()
|
||||
configuration.logLevel = .verbose
|
||||
configuration.maxLogFilesCount = 100
|
||||
configuration.logFilesSizeLimit = 10 * 1024 * 1024; // 10MB
|
||||
configuration.subLogName = "broadcastUploadExtension"
|
||||
|
||||
if isatty(STDERR_FILENO) == 0 {
|
||||
configuration.redirectLogsToFiles = true
|
||||
}
|
||||
|
||||
MXLog.configure(configuration)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user