Skip to content

feat: add structured JSON logger#6

Open
luojiyin1987 wants to merge 1 commit intoshareAI-lab:mainfrom
luojiyin1987:feature/structured-logging
Open

feat: add structured JSON logger#6
luojiyin1987 wants to merge 1 commit intoshareAI-lab:mainfrom
luojiyin1987:feature/structured-logging

Conversation

@luojiyin1987
Copy link
Copy Markdown

Summary

Add src/logger.ts for structured logging.

Usage

import { logger } from './logger.js'

logger.info('module', 'message')
logger.error('module', 'error', { key: 'value' })

Output

{"time":"...","level":"info","module":"main","message":"Starting..."}

Closes #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 结构化日志组件 (logger.ts)

1 participant