caber_logger

A logger with multiple outputs

####Logs to 4 levels:

  • 0 = no logging
  • 1 = info only
  • 2 = info and debug
  • 3 = info, debug, and exception

####Logs to configurable locations:

  • console.log()
  • file location
  • MongoDB @TODO

####Configurable options:

  • level <0,1,2,3>
  • output <console|file>
  • path

####Installation: Clone from GitHub

#####Or: npm install caber_logger @TODO

####Usage:

var Caber = require('./caber_logger');
 
Caber.config({
        "level" : 3,
        "output" : "console",
        "path" : "./app.log"
    });
 
 
Caber.log({'log':'info', 'msg':'Today is a good day for an IPA'});
 
var val = {'name':'Bob'}; 
 
Caber.log({'log':'debug', 'msg':'A value has been set', 'val':val});
 
var e = "Dammit I got an arrow in the knee!";
 
Caber.log({'log':'exception', 'msg':'An exception has occurred.', 'exception':e});

Because other people quicker than me already used Lumberjack

ca·ber /ˈkābər/

Noun:
A roughly trimmed tree trunk used in the Scottish Highland sport of tossing the caber.