prole/prole-tools-app/Sources/Debug.swift
chrisfu 6fa949cabc refactor(app, scripts): remove deprecated init-port-forwards.sh; enhance UI and db management
- Deleted `init-port-forwards.sh`, removing deprecated placeholder script.
- Introduced `dbStatus` command in `PFScriptBridge.swift` for querying database status with `kubecolor`.
- Improved `StatusView` UI: refined button interactivity and font standardization.
- Added `DBStatusWindowController` to `AppDelegate` for better database status visibility and control.
- Updated `OverlayWindow`: adjusted window levels and interaction behavior for smoother UX.
2025-12-22 21:27:00 -08:00

17 lines
446 B
Swift

import Foundation
enum Debug {
static let isEnabled: Bool = true
static func log(_ message: @autoclosure () -> String) {
guard isEnabled else { return }
let ts = ISO8601DateFormatter().string(from: Date())
FileHandle.standardOutput.write(("[ProleStatus] " + ts + " " + message() + "\n").data(using: .utf8)!)
}
}
@inline(__always)
func dlog(_ message: @autoclosure () -> String) {
Debug.log(message())
}