mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-08-31 09:43:38 +03:00
chore: v0.0.53 - make debug logging toggleable via DEBUG_ENABLED constant
- Set DEBUG_ENABLED = false by default - Set to true to re-enable file-based debug logging
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/package.json",
|
||||
"name": "@troed/oc-ls-stats",
|
||||
"version": "0.0.52",
|
||||
"version": "0.0.53",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./tui": {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/** @jsxImportSource @opentui/solid */
|
||||
import type { TuiPlugin, TuiPluginModule } from "@opencode-ai/plugin/tui"
|
||||
import { createMemo, createSignal } from "solid-js"
|
||||
import { writeFileSync, appendFileSync } from "fs"
|
||||
import { appendFileSync } from "fs"
|
||||
|
||||
const DEBUG_ENABLED = false
|
||||
const DEBUG_LOG = "/tmp/oc-ls-stats-debug.log"
|
||||
function debug(...args: unknown[]) {
|
||||
if (!DEBUG_ENABLED) return
|
||||
try {
|
||||
const line = `${args.map(a => typeof a === "object" ? JSON.stringify(a) : String(a)).join(" ")}\n`
|
||||
appendFileSync(DEBUG_LOG, line)
|
||||
|
||||
Reference in New Issue
Block a user