Skip to content

feat(weather): Add Weather app logging#404

Merged
cameroncooke merged 1 commit intomainfrom
cameroncooke/feat/weather-logging-mcp-config
May 7, 2026
Merged

feat(weather): Add Weather app logging#404
cameroncooke merged 1 commit intomainfrom
cameroncooke/feat/weather-logging-mcp-config

Conversation

@cameroncooke
Copy link
Copy Markdown
Collaborator

Add structured OSLog instrumentation to the Weather example app.

The example now logs app launch mode, location selection and preview events, settings changes, and weather service request timing/results. This makes it easier to verify launch arguments such as --mock-weather-api and inspect runtime behavior when driving the app through XcodeBuildMCP.

The PR also adds the local xcodebuildmcp-dev MCP server entry to .mcp.json for easier local development against the built CLI.

Validated by building the Weather example for iOS Simulator with XcodeBuildMCP. The repository pre-commit hook also ran format check, lint, and build.

Add OSLog categories for the Weather example app and emit useful runtime
logs for app launch, location selection, settings changes, and weather
service requests. Also add the local XcodeBuildMCP development MCP server
configuration.

Co-Authored-By: Codex <noreply@openai.com>
@cameroncooke cameroncooke marked this pull request as ready for review May 7, 2026 20:26
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@404

commit: 8bedaf3

@cameroncooke cameroncooke merged commit 9761c12 into main May 7, 2026
19 checks passed
@cameroncooke cameroncooke deleted the cameroncooke/feat/weather-logging-mcp-config branch May 7, 2026 20:31
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 8bedaf3. Configure here.

init() {
let useMock = ProcessInfo.processInfo.arguments.contains("--mock-weather-api")
weatherService = AppWeatherServiceFactory.makeService()
AppLog.app.notice("launch service=\(useMock ? "mock" : "production", privacy: .public)")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Log message decoupled from actual service selection

Low Severity

The useMock variable independently checks ProcessInfo.processInfo.arguments for the --mock-weather-api flag, but the actual service is created by AppWeatherServiceFactory.makeService() which performs its own independent check. The log message reports based on useMock, not the actual service that was constructed. If the factory's logic ever diverges (e.g., adding environment variable fallback, renaming the flag), the log will silently lie about which service is running — exactly the kind of mismatch this logging PR is trying to help debug.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8bedaf3. Configure here.

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.

1 participant