apple / apple/swift-log

A crash-in-debug/log-in-release LogHandler for helping with the move off of process-global bootstrap

Open
#491 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
4k
Forks
344
Avg merge
1d 15h
Merged PRs (30d)
4

Description

As I adopt the task-local logger, I'd like to flush out all the places where we're still falling back to process-global bootstrap.

One helpful type would be some sort of a LogHandler, that, for example, when used, crashes in debug, and logs to another logger in release.

That'd allow me to catch many of these instances in development, but then also be able to filter logs in production, and clean out the rest. Possibly I could even set alerts for the log message, if it regresses in the future.

Contributor guide

Open the contributing guide

Research direction

Start by reading the task-local logger and process-global bootstrap paths, then inspect the LogHandler API and existing logger behavior. Define how the handler crashes in debug and forwards to another logger in release, with tests showing both modes and confirming the fallback is observable.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.