0.2.0 • Published 4 years ago

atomilog v0.2.0

Weekly downloads
12
License
MIT
Repository
github
Last release
4 years ago

atomilog

npm Build Status MIT License Package Size

Tiny typed logging library, optimized for AWS Lambda.

Installing

npm install atomilog --save

Usage

import { Atomilog } from "atomilog"

// Create log
const log = new Atomilog({
  options: {
    prettify: true, // Pretty print logs for use in development
  },
  // Fields logged in each message
  fields: {
    some: "value",
  },
})

log.debug("Hello, debug.")

// Add new fields logged in each message
log.addFields({ requestId: "my-id" })

log.info("Hello, info.", { different: { nested: "value " } })
log.warn("Hello, warn.")
log.error("Hello, error.", new Error("boom"))

Developing

  • Run tests, npm test

License

MIT © Rocky Warren

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

5 years ago

0.0.1

5 years ago