Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log viewer to watch app #849

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Add log viewer to watch app #849

merged 2 commits into from
Oct 31, 2024

Conversation

timbms
Copy link
Contributor

@timbms timbms commented Oct 31, 2024

No description provided.

@digitaldan
Copy link
Contributor

So i have been also wanting to get a log viewer for the main app as well, it would probably save us a huge amount of troubleshooting time. Is there anything to share here or is this mainly just a specific watch UI change? For our main app, would we need to switch to use OSLog throughout the app to enable this?

let logStore = try! OSLogStore(scope: .currentProcessIdentifier)
self.logs = try! logStore.getEntries().compactMap { entry in
guard let logEntry = entry as? OSLogEntryLog,
logEntry.subsystem.starts(with: "com.donnywals") == true else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this is checking for com.donnywals ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file in folder Rows should not have been part of the commit

@timbms
Copy link
Contributor Author

timbms commented Oct 31, 2024

So i have been also wanting to get a log viewer for the main app as well, it would probably save us a huge amount of troubleshooting time. Is there anything to share here or is this mainly just a specific watch UI change? For our main app, would we need to switch to use OSLog throughout the app to enable this?

This was just a quick hack to tackle the watch app problem. Ideally it should be shared with iOS app. Also, we should have an option to download the logs for posting of issues here.

I don't think we need to switch to the new interface of OSLog. It should be just a more convenient API. But, I haven't tested yet.

@timbms
Copy link
Contributor Author

timbms commented Oct 31, 2024

How shall we proceed? Pushing this out immediately to support testing of watch app or harmonizing approach on watchOS and iOS app?

@timbms timbms merged commit dfc0292 into develop Oct 31, 2024
2 checks passed
@timbms timbms deleted the watch-log branch October 31, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants