xarleyn/dsh-plugins--packages-plugin-log ↗★ 1

@yadsh/dsh-plugin-log

Shared structured file logging and runtime logger discovery for DSH plugins 适合统一排障与日志归档需求的场景,需要由日志系统消费该能力

패키지
@yadsh/dsh-plugin-log
호환성
미검증
버전
0.2.1
라이선스
MIT
최근 업데이트
2026. 9. 13.

설치

검증된 bundle이 없거나 호환성 검사에 실패했습니다. 먼저 저장소 설명을 읽어 주세요. 전체 README 읽기 ↗

@yadsh/dsh-plugin-log

Structured JSON or readable-text file logging for server-side DeepSeek Harness plugins, with daily rotation, retention, console mirroring, and runtime discovery.

import {
  createHostLoggerSink,
  getPluginLogger,
  getRegisteredPluginLoggers,
  setPluginLogFormat,
  setPluginLogLevel,
  subscribePluginLoggerRegistry,
} from "@yadsh/dsh-plugin-log";

const log = getPluginLogger({
  pluginId: "dsh-example",
  consoleSink: createHostLoggerSink(ctx.logger),
});
log.info("example.ready");

const unsubscribe = subscribePluginLoggerRegistry((loggers) => {
  console.info("active logger consumers", loggers);
});

setPluginLogLevel("dsh-example", "debug");
setPluginLogFormat("text");
unsubscribe();
await log.close();

The registry is process-wide and tracks active logger instances automatically. @yadsh/dsh-plugin-log-ui uses it to provide live defaults, per-plugin level overrides, and a json/text selector in DSH settings. See the repository's docs/PLUGIN_LOGGING.md for the complete behavior and API contract.

Development

pnpm --filter @yadsh/dsh-plugin-log check

License

MIT