treelog

0.8.0 • Public • Published

Treelog prints out your logs along with the functions they were called from, and arranges them in a tree based on a stacktrace:

var log = require("treelog")
 
function makeBreakfast() {
  log("so hungry")
  toast()
}
 
function toast() {
  log("bread is soft")
  stove.on()
  log("so toasty!")
}
 
var stove = {
  on: function() {
    log("ignition!")
  }
}
 
makeBreakfast()

will log out:

 makeBreakfast → - - - - - - - - - - - - -   so hungry
 - toast → - - - - - - - - - - - - - - - -   bread is soft
 - - Object.stove.on → - - - - - - - - - -   ignition!
 - toast → - - - - - - - - - - - - - - - -   so toasty!

Readme

Keywords

none

Package Sidebar

Install

npm i treelog

Weekly Downloads

2

Version

0.8.0

License

ISC

Last publish

Collaborators

  • erikpukinskis