fix(api): replace debug console.log with console.warn in production handlers#827
Closed
NewCoder3294 wants to merge 2 commits intokoala73:mainfrom
Closed
fix(api): replace debug console.log with console.warn in production handlers#827NewCoder3294 wants to merge 2 commits intokoala73:mainfrom
NewCoder3294 wants to merge 2 commits intokoala73:mainfrom
Conversation
…tion handlers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@NewCoder3294 is attempting to deploy a commit to the Elie Team on Vercel. A member of the Team first needs to authorize it. |
koala73
added a commit
that referenced
this pull request
Mar 6, 2026
Supersedes #827 (rebased on current main with seed-based paths). All 21 console.log calls in server/worldmonitor/ either upgraded to console.warn (missing API keys, stale fallbacks, operational summaries, closures detected) or removed (debug traces, cache hits, per-item noise). Removes dead code block in fetchSingleAirport after its log was removed. Co-authored-by: Nicolas Dos Santos <NewCoder3294@users.noreply.github.com>
3 tasks
Owner
|
Thank you - swamped, just got to it, but app got a big architecture update so #1097 |
koala73
added a commit
that referenced
this pull request
Mar 6, 2026
…ers (#1097) Supersedes #827 (rebased on current main with seed-based paths). All 21 console.log calls in server/worldmonitor/ either upgraded to console.warn (missing API keys, stale fallbacks, operational summaries, closures detected) or removed (debug traces, cache hits, per-item noise). Removes dead code block in fetchSingleAirport after its log was removed. Co-authored-by: Nicolas Dos Santos <NewCoder3294@users.noreply.github.com>
aldoyh
pushed a commit
to aldoyh/worldmonitor
that referenced
this pull request
Mar 6, 2026
…ers (koala73#1097) Supersedes koala73#827 (rebased on current main with seed-based paths). All 21 console.log calls in server/worldmonitor/ either upgraded to console.warn (missing API keys, stale fallbacks, operational summaries, closures detected) or removed (debug traces, cache hits, per-item noise). Removes dead code block in fetchSingleAirport after its log was removed. Co-authored-by: Nicolas Dos Santos <NewCoder3294@users.noreply.github.com>
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.
Summary
Cleans up
console.logusage in server handler files underserver/worldmonitor/. All 20console.logcalls were either upgraded toconsole.warn(for operationally significant messages) or removed (debug/trace noise).Changes by file
server/worldmonitor/military/v1/get-usni-fleet-report.ts(4 calls):[USNI Fleet] Fetching from WordPress API...— debug trace, fires every fetchconsole.warn[USNI Fleet] Parsed: N vessels, N CSGs, N regions— operational summary worth monitoring[USNI Fleet] Cache hit— routine cache behavior, pure noiseconsole.warn[USNI Fleet] Returning stale cached data— noteworthy fallback condition (serving stale data after an error)server/worldmonitor/aviation/v1/_shared.ts(10 calls):console.warn[Aviation] No AVIATIONSTACK_API key — skipping— missing API key is noteworthy[Aviation] Querying N airports (concurrency=N)— debug trace on every batch runconsole.warn[Aviation] Done: N ok, N failed, N alerts, healthy=bool— operational summary with failure counts[Aviation] IATA: N flights, N cancelled, N delayed— per-airport trace, extremely chattyconsole.warn[Aviation] NOTAM: no ICAO_API_KEY — skipping— missing API key[Aviation] NOTAM: fetching via relay for N airports— debug trace[Aviation] NOTAM: fetching direct for N airports— debug trace[Aviation] NOTAM: N raw NOTAMs received— debug traceconsole.warn[Aviation] NOTAM closures: ICAO, ICAO, ...— actual airport closures detected, operationally significant[Aviation] NOTAM: no closures found— routine no-op, noiseserver/worldmonitor/aviation/v1/list-airport-delays.ts(6 calls + 1 dead variable):[Aviation] FAA: N alerts— debug traceconsole.warn[Aviation] No AVIATIONSTACK_API key — using simulation— fallback to simulation mode[Aviation] AviationStack OK: N real alerts— debug trace[Aviation] Intl: N alerts— debug traceconsole.warn[Aviation] NOTAM: N closures applied— operationally significant overlay[Aviation] Total: N alerts (N normal) in Nms— debug summary; also removed the now-unusedt0timing variableif (flights.length > 0)block infetchSingleAirportthat only computed unusedcancelled/delayedvariables after their log was removedRationale
console.warnAll existing
console.warnandconsole.errorcalls were left untouched. No new logging was added. Log prefix format (e.g.,[USNI Fleet],[Aviation]) is preserved on all upgraded messages.Test plan
tsc --noEmit)console.logcalls inserver/worldmonitor/🤖 Generated with Claude Code