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

xclogparser parses the second to the latest .xcactivitylog #146

Closed
yongjincho92 opened this issue Sep 16, 2021 · 3 comments
Closed

xclogparser parses the second to the latest .xcactivitylog #146

yongjincho92 opened this issue Sep 16, 2021 · 3 comments

Comments

@yongjincho92
Copy link

As noted in the README for XCLogParser, .xcactivitylog file is generated a few seconds after the build action is completed. I added the xclogparser parse command into the build's post action and what I see is that the xclogparser parses the xcactivitylog for the second to the latest build log.

I am using Xcode 12.5.1 and I am not sure if this is by design or a bug. Can someone also confirm that adding xclogparser as the post build action is guaranteed to wait for the latest .xcactivitylog file to be generated and then parse it?

@polac24
Copy link
Collaborator

polac24 commented Sep 16, 2021

Hi!
No, XCLogParser doesn't retry if .xcactivitylog is invalid.

For your scenario with post build action, you can use XCMetrics, which actually validates .xcactivitylog and retries if is not ready yet:

https://github.com/spotify/XCMetrics/blob/0f449cc9dc328de3fcd85e08edec18f43da3a041/Sources/XCMetricsClient/Log%20Management/LogManager.swift#L128-L155

@dezinezync
Copy link

...am using Xcode 12.5.1 and I am not sure if this is by design or a bug.

I can reproduce the same with Xcode Version 13.3 (13E113)

Adding something along the lines of sleep 5; before executing xclogparser... in the post-build section does not work either.

@PatrikBillgren
Copy link
Collaborator

Closing since the original question is answered

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

No branches or pull requests

4 participants