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/09/13

インストール

検証済み bundle がないか、互換性チェックに失敗しています。先にリポジトリの説明を読んでください。 README 全文を読む ↗

ドキュメント

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