isDebugLoggingEnabled (backend/debugLog.ts)

dbx · apps/desktop/src/lib/backend/debugLog.ts · typescript · Apache-2.0
infra, tag:knn-classified

Client-side debug logging with localStorage persistence and export support.

// Source: https://github.com/t8y2/dbx | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
const DEBUG_LOG_ENABLED_KEY = "dbx-debug-logging-enabled";
const DEBUG_LOG_ENTRIES_KEY = "dbx-debug-log-entries";
const MAX_DEBUG_LOG_ENTRIES = 1500;
const MAX_TEXT_LENGTH = 4000;
const MAX_LABEL_LENGTH = 120;

type DebugLogLevel = "debug" | "info" | "log" | "warn" | "error";

interface DebugLogEntry {
  timestamp: string;
  level: DebugLogLevel;
  message: string;
}

export interface BrowserMemorySnapshot {
  jsHeapUsedBytes?: number;
  jsHeapTotalBytes?: number;
  jsHeapLimitBytes?: number;
  deviceMemoryGiB?: number;
  hardwareConcurrency?: number;
}

export interface NativeProcessMemorySnaps

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key