walnut-logging

Solid

Logging system details for src/logging/ — logger API & child loggers, log levels, automatic secret redaction, browser console log persistence (how to investigate frontend issues from disk logs). Use when adding logging or investigating issues via /tmp/open-walnut logs.

AI & Automation 32 stars 8 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
51
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Logging System — Implementation Details For log locations and CLI commands, see project `CLAUDE.md`. ## Using Loggers in Code ```typescript import { log } from '../logging/index.js'; // Use pre-created loggers log.bus.info('event emitted', { name: 'task:created', traceId: 'abc123' }); log.agent.error('tool failed', { toolName: 'search', error: err.message }); // Create child loggers for sub-modules const loopLog = log.agent.child('loop'); loopLog.info('round 3/10'); // → tag: agent/loop ``` Call `initLogging()` once at startup (creates the log directory, prunes old files). After that, use `log.<subsystem>` anywhere. ## Log Levels | Level | Label | Color | Severity | |---|---|---|---| | `trace` | TRC | gray | 0 (lowest) | | `debug` | DBG | cyan | 1 | | `info` | INF | green | 2 | | `warn` | WRN | yellow | 3 | | `error` | ERR | red | 4 | | `fatal` | FTL | bg-red | 5 (highest) | ## Redaction All log lines pass through `redactSensitiveText()` before being written to the file. The following patterns are automatically replaced with `[REDACTED]`: - **API keys**: OpenAI / Anthropic `sk-...` keys - **AWS credentials**: `AKIA...` access key IDs, `aws_secret_access_key`, `aws_session_token` - **Bearer tokens**: `Authorization: Bearer <token>` - **PEM blocks**: `-----BEGIN ... PRIVATE KEY-----` through `-----END ... PRIVATE KEY-----` - **Generic secrets**: Values after `password=`, `secret=`, `token=`, `api_key=`, `apikey=` ## Scroll-jump / flicker sentinels (session chat) ...

Details

Author
EvanZhang008
Repository
EvanZhang008/open-walnut
Created
6 months ago
Last Updated
4 days ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category