forked from kean/Pulse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConsoleView.swift
29 lines (27 loc) · 1.06 KB
/
ConsoleView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// The MIT License (MIT)
//
// Copyright (c) 2020-2024 Alexander Grebenyuk (github.com/kean).
import SwiftUI
import CoreData
import Pulse
import Combine
extension ConsoleView {
/// Initializes the console view.
///
/// - parameters:
/// - store: The store to display. By default, `LoggerStore/shared`.
/// - mode: The initial console mode. By default, ``ConsoleMode/all``. If you change
/// the mode to ``ConsoleMode/network``, the console will display the
/// network messages up on appearance.
/// - configuration: Configuration options to alter the UI behavior and settings.
/// - delegate: The delegate that allows you to customize multiple aspects
/// of the console view.
public init(
store: LoggerStore = .shared,
mode: ConsoleMode = .all,
configuration: ConsoleConfiguration = .default,
delegate: ConsoleViewDelegate? = nil
) {
self.init(environment: .init(store: store, mode: mode, configuration: configuration, delegate: delegate ?? DefaultConsoleViewDelegate()))
}
}