DebugEventLog honors PROGRAMA_* env vars (#143) - #160
Merged
Conversation
resolveLogPath() was never renamed in the cmux->programa migration: it only read CMUX_DEBUG_LOG/CMUX_TAG/CMUX_SOCKET_PATH, none of which are set anymore, so dlog fell through to /tmp/cmux-debug-<bundleid>.log and the documented tail flow tailed a file that never existed. PROGRAMA_* names now win, CMUX_* kept as fallback, bundle-id/default fallbacks renamed to programa-debug. Env injected for testability; four precedence tests added. Closes #143
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
dlogoutput now lands where the docs say it does:/tmp/programa-debug-<tag>.log, the pathreload.shexports and writes to/tmp/programa-last-debug-log-path. Until now the vendored logger only read the pre-renameCMUX_*env vars, so the documented tail flow tailed a file that was never created.Closes #143.
Summary
resolveLogPath()checksPROGRAMA_DEBUG_LOG/PROGRAMA_TAG/PROGRAMA_SOCKET_PATHfirst, keepsCMUX_*fallbacks, and renames the bundle-id/default fallbacks toprograma-debug*-bgbackground-events fileTest Plan
cd vendor/bonsplit && swift build— Build completeswift test— DebugEventLogTests 4/4 pass