limberjack

import Limber from "limberjack"; const log = new Limber("Application",{ file:"log.txt", tags:["debugging","demo","nodejs"] })

Usage no npm install needed!

<script type="module">
  import limberjack from 'https://cdn.skypack.dev/limberjack';
</script>

README

Limberjack

LimberJack Logger

import Limber from "limberjack";
const log = new Limber("Application",{
    file:"log.txt",
    tags:["debugging","demo","nodejs"]
})

log.info("hello world")

// Console
/**
2016-12-01T14:22:18.397Z INFO:Application: hello world
**/



const newlog = log.extend("Section",{
    tags:["specific"]
})


newlog.info("good bye world");
// Console
/**
2016-12-01T14:22:20.397Z INFO:Application:Section: good bye world
**/

Log File Output

{type:"info",tags:["debugging","demo","nodejs"],text:"hello world",timestamp:"2016-12-01T14:22:18.397Z"}
{type:"info",tags:["debugging","demo","nodejs","specific"],text:"good bye world",timestamp:"2016-12-01T14:22:20.397Z"}

CLI Usage

// Not all tags need to be selected
Limberjack --tags "debugging,demo" log.txt

Limberjack --level "info,error"