Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple log manager.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
doc
src
.gitignore
.jshintrc
.travis.yml
Gruntfile.js
LICENSE
README.md
package.json
qunit.html
qunit.min.html

README.md

Log

Build Status

Log is a simple log manager designed to be used either with a browser (or Node.js) console, or as a drop in alternative. The basic methods (debug, error, info, log, warn) can all be used the same way, and can be either serialized and sent somewhere, or dumped to the browser console.

// browser
var log = new Herrera.Log();

// node
var log = require("h-log").log;
    log = new log();

log.done().add(
    function (entry) {
        // for pretty browser objects in console
        console[entry.getType()](entry.toObject());

        // for node
        console[entry.getType()](entry.toString());
    }
);

log
    .error("This object is bad!", badObject)
    .attr("my", "attribute")
    .done();

Documentation

Something went wrong with that request. Please try again.