Observability

Logging

Structured logging with levels and transports.

1 min readDocumentationEdit this page

Usage#

typescript
import { Logger } from '@AxilJS/observability'
 
const logger = new Logger({ name: 'UserService' })
 
logger.info('User created', { userId: 123 })
logger.error('DB error', { error: err.message })
 
const child = logger.child({ requestId: 'abc' })
child.info('Processing')

Development: pretty colors. Production: JSON.

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY