Skip to content

Commit

Permalink
Merge branch 'develop' into fix/incorrect-message-order-while-offline
Browse files Browse the repository at this point in the history
  • Loading branch information
laevandus authored Jul 26, 2024
2 parents c14e5e7 + 95ee556 commit e404de3
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DemoApp/StreamChat/StreamChatWrapper+DemoApp.swift
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ extension StreamChatWrapper {
}

// Set the log level
LogConfig.level = .warning
LogConfig.level = StreamRuntimeCheck.logLevel ?? .warning
LogConfig.formatters = [
PrefixLogFormatter(prefixes: [.info: "ℹ️", .debug: "🛠", .warning: "⚠️", .error: "🚨"])
]
6 changes: 6 additions & 0 deletions DemoApp/StreamRuntimeCheck+StreamInternal.swift
Original file line number Diff line number Diff line change
@@ -9,4 +9,10 @@ extension StreamRuntimeCheck {
static var isStreamInternalConfiguration: Bool {
ProcessInfo.processInfo.environment["STREAM_DEV"] != nil
}

static var logLevel: LogLevel? {
guard let value = ProcessInfo.processInfo.environment["STREAM_LOG_LEVEL"] else { return nil }
guard let intValue = Int(value) else { return nil }
return LogLevel(rawValue: intValue)
}
}

0 comments on commit e404de3

Please sign in to comment.