Skip to content

erikpukinskis/treelog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Indents log lines according to your stack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published