Repository navigation
v0.2.0
Transports
Added support for sending logs to multiple destinations:
- Console — pretty or JSON output
- File — write to disk (Node.js only)
- Webhook — POST to any HTTP endpoint
import { createLogger, transports } from 'logfx'
const log = createLogger({
transports: [
transports.console({ format: 'pretty' }),
transports.file({ path: './logs/app.log' }),
transports.webhook({ url: 'https://your-api.com/logs' }),
]
})
JSON format
For production use, you can now output structured JSON:
transports.console({ format: 'json' })
// {"timestamp":"...","level":"info","message":"..."}
Other changes
- Performance benchmarks added
- E2E tests for transports
- CI now runs tests in separate jobs
- Dependabot configured for dependency updates
- Bumped vitest to fix esbuild vulnerability