mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Handover log file management to Rust. (#2495)
* Handover log file management to Rust.
Fix all the tests, disabling the logging ones for now.
* Merge logging tests into a single case 😬
Not ideal but at least they're now running.
* Move TracingConfiguration into its own file.
* Split up the tests into smaller functions instead of writing code like a caveman.
This commit is contained in:
@@ -23,6 +23,7 @@ class BugReportScreenViewModel: BugReportScreenViewModelType, BugReportScreenVie
|
||||
private let bugReportService: BugReportServiceProtocol
|
||||
private let userID: String?
|
||||
private let deviceID: String?
|
||||
|
||||
private let actionsSubject: PassthroughSubject<BugReportScreenViewModelAction, Never> = .init()
|
||||
// periphery:ignore - when set to nil this is automatically cancelled
|
||||
@CancellableTask private var uploadTask: Task<Void, Never>?
|
||||
@@ -89,7 +90,6 @@ class BugReportScreenViewModel: BugReportScreenViewModelType, BugReportScreenVie
|
||||
deviceID: deviceID,
|
||||
text: context.reportText,
|
||||
includeLogs: context.sendingLogsEnabled,
|
||||
includeCrashLog: true,
|
||||
canContact: context.canContact,
|
||||
githubLabels: [],
|
||||
files: files)
|
||||
|
||||
@@ -19,14 +19,11 @@
|
||||
import Combine
|
||||
import SwiftUI
|
||||
|
||||
struct LogViewerScreenCoordinatorParameters { }
|
||||
|
||||
enum LogViewerScreenCoordinatorAction {
|
||||
case done
|
||||
}
|
||||
|
||||
final class LogViewerScreenCoordinator: CoordinatorProtocol {
|
||||
private let parameters: LogViewerScreenCoordinatorParameters
|
||||
private var viewModel: LogViewerScreenViewModelProtocol
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
@@ -35,9 +32,7 @@ final class LogViewerScreenCoordinator: CoordinatorProtocol {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(parameters: LogViewerScreenCoordinatorParameters) {
|
||||
self.parameters = parameters
|
||||
|
||||
init() {
|
||||
viewModel = LogViewerScreenViewModel()
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class LogViewerScreenViewModel: LogViewerScreenViewModelType, LogViewerScreenVie
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(initialViewState: LogViewerScreenViewState(urls: MXLogger.logFiles))
|
||||
super.init(initialViewState: LogViewerScreenViewState(urls: RustTracing.logFiles))
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ private struct LogLevelConfigurationView: View {
|
||||
if case .custom(let configuration) = logLevel.wrappedValue {
|
||||
customTracingConfiguration = configuration
|
||||
} else {
|
||||
customTracingConfiguration = TracingConfiguration(logLevel: .info).filter
|
||||
customTracingConfiguration = TracingConfiguration(logLevel: .info, target: nil).filter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user