beeware / mobile-forge

A tool to manage building cross-platform binary wheels for mobile devices
BSD 3-Clause "New" or "Revised" License
20 stars 13 forks source link

Capture logs during a build #9

Closed freakboy3742 closed 11 months ago

freakboy3742 commented 1 year ago

What is the problem or limitation you are having?

Builds can generate lots of logs, especially if you're doing a full build of all packages. If a build fails, it would be nice to have access to the full logs of that build.

Describe the solution you'd like

The logs generated by forge should be tee'd both to the console, and to a per package-platform-version log file.

As an added bonus, it would be desirable if a failed build of a single package didn't stop the entire build process; instead, it should write an indicator somewhere that the build failed, and move onto the next package.

Describe alternatives you've considered

Use tee at the command line. This works, but only produces a single massive log file, which can be unwieldy.

Additional context

Briefcase has a variant of this capability with its streaming logs and Rich. Adding rich to forge would also let us do things like add a prefix to every log line on the screen, so we can easily determine which package/platform is currently being built, but keep the stored log file bare without the prefix.