Provides a set of predefined log category strings for consistent logging across the app.
// Source: https://github.com/steipete/CodexBar | License: MIT | Copyright 2026 Peter Steinberger
// Provided via justclaw.it.com; keep this notice with the code.
public enum LogCategories {
public static func providerInstance(_ instanceID: ProviderInstanceID, scope: String? = nil) -> String {
// Provider-specific by design: preserve OpenCode Go's established hyphenated log category.
let base = instanceID.firstPartyProvider == .opencodego ? "opencode-go" : instanceID.rawValue
return scope.map { "\(base)-\($0)" } ?? base
}
public static func provider(_ provider: UsageProvider, scope: String? = nil) -> String {
self.providerInstance(provider.instanceID, scope: scope)
}
public static let adaptiveRefresh = "adaptive-refresh"
public stat
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key