Wondering what’s next for npm?Check out our public roadmap! »

    atomilog

    0.2.0 • Public • Published

    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

    Install

    npm i atomilog

    DownloadsWeekly Downloads

    7

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    3.64 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar