Improvements to logging (#457)

* Use `.info` logging in most places.
* Remove old objc logging support.
* Fix table view controller.
* Make sure timeline item content isn't logged.
* Add tests.
This commit is contained in:
Doug
2023-01-17 09:28:01 +00:00
committed by GitHub
parent 4b56e4af73
commit c8937505d7
57 changed files with 542 additions and 275 deletions
@@ -23,6 +23,8 @@ struct TemplateCoordinatorParameters {
enum TemplateCoordinatorAction {
case accept
case cancel
// Consider adding CustomStringConvertible conformance if the actions contain PII
}
final class TemplateCoordinator: CoordinatorProtocol {
@@ -40,9 +42,9 @@ final class TemplateCoordinator: CoordinatorProtocol {
func start() {
viewModel.callback = { [weak self] action in
guard let self else { return }
MXLog.debug("TemplateViewModel did complete with result: \(action).")
switch action {
case .accept:
MXLog.info("User accepted the prompt.")
self.callback?(.accept)
case .cancel:
self.callback?(.cancel)
@@ -46,6 +46,8 @@ extension TemplatePromptType: Identifiable, CaseIterable {
enum TemplateViewModelAction {
case accept
case cancel
// Consider adding CustomStringConvertible conformance if the actions contain PII
}
struct TemplateViewState: BindableState {
@@ -58,4 +60,6 @@ enum TemplateViewAction {
case decrementCount
case accept
case cancel
// Consider adding CustomStringConvertible conformance if the actions contain PII
}