Skip to content

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Jan 6, 2026

  • Write log messages to standard output in terminal environment.
  • Write log messages to unified logging system of macOS (see Console app of macOS, filter for "mac-crafter" process and "com.nextcloud.mac-crafter" subsystem).
  • Write log messages to a log file (located in ~/Library/Logs/mac-crafter).
  • All simultaneously.
  • Standard output and errors from child processes launched are captured, too. In example all the KDE Craft output which is run by mac-crafter.

@i2h3 i2h3 added this to the 4.0.5 milestone Jan 6, 2026
@i2h3 i2h3 self-assigned this Jan 6, 2026
@i2h3 i2h3 added bug os: 🍎 macOS CI build/checks continuous integration, Drone, testing labels Jan 6, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Jan 6, 2026
@i2h3 i2h3 marked this pull request as ready for review January 6, 2026 10:51
Copilot AI review requested due to automatic review settings January 6, 2026 10:51
@i2h3 i2h3 requested a review from nilsding as a code owner January 6, 2026 10:51
@i2h3 i2h3 force-pushed the i2h3/fix/crafter-rm branch from 25d8a61 to ab925dd Compare January 6, 2026 10:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a comprehensive logging system for mac-crafter that replaces direct print() statements with a centralized logging facility. The new system simultaneously writes to standard output, the macOS unified logging system, and a log file in ~/Library/Logs/mac-crafter.

Key Changes:

  • Introduces a new Log actor with info() and error() methods for centralized logging
  • Enhances Shell.swift to capture and route child process stdout/stderr through the logging system
  • Updates all direct print() calls throughout the codebase to use the new logging API

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
admin/osx/mac-crafter/Sources/Log.swift New logging facility implementation with file, console, and unified logging system support
admin/osx/mac-crafter/Sources/Utils/Shell.swift Added pipe-based output capture to route child process output through logging system
admin/osx/mac-crafter/Sources/Utils/Signer.swift Replaced print() calls with Log.info() for signing operations
admin/osx/mac-crafter/Sources/Utils/Packaging.swift Converted print statements to Log.info and improved error message terminology
admin/osx/mac-crafter/Sources/Utils/Install.swift Updated installation messages to use Log.info
admin/osx/mac-crafter/Sources/Commands/Build.swift Migrated print/error messages to Log.info/error throughout build workflow
admin/osx/mac-crafter/README.md Updated title and added troubleshooting section documenting the new logging system

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Write to standard output in terminal environment.
- Write to unified logging system.
- Write to log file.
- All simultaneously.
- Standard output and errors from child processes launched are captured, too.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 force-pushed the i2h3/fix/crafter-rm branch from ab925dd to 0d976ef Compare January 6, 2026 11:26
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Artifact containing the AppImage: nextcloud-appimage-pr-9290.zip

Digest: sha256:2401fc617b61c4a464250ac08584343a0fe614faedb416056d2b586f75898df1

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 6, 2026

@i2h3 i2h3 merged commit 521d909 into master Jan 6, 2026
23 of 24 checks passed
@github-project-automation github-project-automation bot moved this from 🧭 Planning evaluation (don't pick) to ☑️ Done in 💻 Desktop Clients team Jan 6, 2026
@i2h3 i2h3 deleted the i2h3/fix/crafter-rm branch January 6, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug CI build/checks continuous integration, Drone, testing os: 🍎 macOS

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

2 participants