-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
System log messages no longer displayed on iOS 10 #140
Comments
Yea, it looks like ASL has been replaced by OS Log. We'll need to provide conditional support for iOS 10+. |
I also have this problem ,hope to resolve this |
Looking forward to the enhancement |
Same problem with iphone7/p, but iphone6/p can output logs. |
Solved? |
same problem and I use the GHConsole the repository in GitHub to solve this problem. https://github.com/Liaoworking/GHConsole |
I have a idea and test in a simple project, maybe anyone can add it to |
Read logs using the new swift os_log api |
Is this still broken? I'm on iOS 11 and it seems to be working fine, but I am jailbroken |
@NSExceptional Yes it still appears to be broken for me, even on my jailbroken device (iOS 11.3.1) |
Same here in iOS 12.0 |
This may be an alternative. |
Thank you! I'll look into that. This bug is killing me. |
@CodeLife2012 I don't believe NSLog writes to either of the standard outputs, so I'm not sure how useful that would be. That appears to be what the link by @PhilCai1993 is doing as well. |
Is there any solution? |
There is no way to swizzle a function. I'm looking into other means currently |
more progress
more progress
Ugh, I always forget that referencing an issue makes it pop up here. Anyway, I've got logs working on iOS 10+, but there's a problem. OS Log doesn't provide a way to get old messages the way ASL does. In ASL, you could query the log like a database and get every single message since the app launched. With OS Log, it seems we have to continuously monitor it to get logs. I'd love some feedback on what we should do about that, because it's not very useful to only see the logs that appear as you're viewing the log in FLEX. I'm thinking maybe monitor on launch and write the logs to a file that gets purged on the next launch? But if there's a lot of logs, it could be costly to use a simple text file for storage. |
more progress
more progress
more progress
Alright, I've finally fixed this. I've added two new classes: There's a caveat though. OS Log is much more limited that ASL. ASL worked transparently like a database; you could simply ask it for every log message so far and you would get them all back, and it's reasonable to assume that ASL doesn't count against your memory limit. OS Log, however, has no such API to my knowledge. You can only simply intercept messages as they come in. So, on iOS 10+, there will be a Settings button in the navigation bar. If you press it, it will explain this to you and give you the option to turn what I'm calling "persistent logging" on or off. With persistent logging on, log messages will be stored in memory in the background from the moment the app launches, until it is turned off or the app closes. It defaults to off. Here is where I got the technique to fix this, and this is what I assume he used to reverse engineer the API. Because it is a private API. |
On iOS 10 betas 1-4 no log messages are displayed. Probably due to introduced Unified Logging and Activity Tracing?
The text was updated successfully, but these errors were encountered: