بنقرة واحدة
logging-guide
OSLog logging conventions — Logger setup, log levels, category naming, and migration from print().
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
OSLog logging conventions — Logger setup, log levels, category naming, and migration from print().
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Implement UI from Figma designs via MCP with a closed-loop pixel-parity check. Extract exact values (never eyeball), translate to SwiftUI, then render→diff→fix against the Figma export until it matches. Use when implementing or auditing UI against Figma.
HTTP networking layer reference — TargetType, HTTPClient, services, error handling.
Fetch CodeRabbit review comments from batch PRs and auto-fix the issues. Pushes fixes and re-requests review.
Run multiple tasks overnight as parallel PRs. Produces a PRD per task, selects skills/rules, spawns isolated agents, and reports PR links.
Run multiple tasks overnight as parallel PRs. Produces a PRD per task, selects skills/rules, spawns isolated agents, and reports PR links.
Run SwiftLint and xcodebuild to verify the project compiles cleanly.
| name | logging-guide |
| description | OSLog logging conventions — Logger setup, log levels, category naming, and migration from print(). |
All logging in the codebase uses Apple's OSLog framework via Logger. Never use print() for logging.
See VultisigApp/VultisigApp/Core/Networking/HTTPClient.swift for the canonical example.
import OSLog
// In a class:
class MyService {
private let logger = Logger(subsystem: "com.vultisig.app", category: "my-service")
}
// In a struct or View (file-level, above the type):
private let logger = Logger(subsystem: "com.vultisig.app", category: "my-view")
struct MyView: View { ... }
| Item | Rule |
|---|---|
| Subsystem | Always "com.vultisig.app" |
| Category | Kebab-case, describes the component (e.g., "http-client", "tx-history-recorder", "home-screen") |
| Access | private let logger — never expose loggers publicly |
| Level | Usage | Example |
|---|---|---|
logger.debug() | Verbose info for development | logger.debug("Headers: \(headers)") |
logger.info() | Normal operational events | logger.info("Cleaned up \(count) old transactions") |
logger.warning() | Recoverable issues | logger.warning("Request cancelled") |
logger.error() | Failures that need attention | logger.error("Failed to load: \(error)") |
import OSLog (alphabetical order with other imports)print("ClassName: message \(value)") with the appropriate log level.error(), info/status → .info(), debug data → .debug()// BAD: print()
print("MyService: Failed to save: \(error)")
// BAD: Redundant class name in message
logger.error("MyService: Failed to save: \(error)")
// GOOD
logger.error("Failed to save: \(error)")