@dashkite/kaiko

0.3.3 • Public • Published

Kaikō

A logging runtime for JavaScript

import * as log from "@dashkite/kaiko"

foo = (bar) ->
  log.push "foo"
  log.info bar
  # do something ...
  log.warn "uh-oh"
  # do some other things ...
  log.pop "foo"

Later, you can write the log as rich JSON (meaning the objects JSON normally ignores are converted into values it can serialize for reference purposes):

log.write process.stdout

From there, you can pipe the output to a tool like fx.

npm test | fx

Or, if you’re in the browser, just access the JSON:

log.toJSON()

Installation

npm i @dashkite/kaiko

/@dashkite/kaiko/

    Package Sidebar

    Install

    npm i @dashkite/kaiko

    Weekly Downloads

    5

    Version

    0.3.3

    License

    SEE LICENSE IN LICENSE.md

    Unpacked Size

    51.1 kB

    Total Files

    5

    Last publish

    Collaborators

    • dyoder
    • freeformflow