Skip to content

v0.2.0

Choose a tag to compare

@chintanshah35 chintanshah35 released this 18 Dec 21:46
· 166 commits to main since this release

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