Skip to content

Make ConsoleLogger Apple-only for non-Apple builds#7

Closed
leogdion wants to merge 2 commits into
mergesort:mainfrom
brightdigit:fix/non-apple-build
Closed

Make ConsoleLogger Apple-only for non-Apple builds#7
leogdion wants to merge 2 commits into
mergesort:mainfrom
brightdigit:fix/non-apple-build

Conversation

@leogdion

Copy link
Copy Markdown

Summary

ConsoleLogger imported OSLog unconditionally, which breaks non-Apple builds with no such module 'OSLog' (e.g. Linux). This wraps the whole type — the import, the Logger-backed implementation, and the OSLogType mapping — in #if canImport(OSLog).

The result: ConsoleLogger stays backed by Apple's unified logging system (Console.app / Xcode / OSLog tools) on Apple platforms, and is simply unavailable on platforms without OSLog — no separate code path to maintain.

Notes

🤖 Generated with Claude Code

mergesort and others added 2 commits June 16, 2026 21:25
ConsoleLogger imported OSLog unconditionally, breaking non-Apple builds
(`no such module 'OSLog'`). Wrap the whole type in `#if canImport(OSLog)`
so it stays OSLog-backed on Apple platforms and is simply unavailable
where OSLog can't be imported (e.g. Linux).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@leogdion

Copy link
Copy Markdown
Author

Closing: the head repo (brightdigit/Broadcast) was detached from the fork network, so this PR is stuck on a stale base and can't update. Recreating from a freshly re-forked brightdigit/Broadcast — replacement link to follow.

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