bug-killer
A colored way to find bugs and fix them.
Installation
Run the following commands to download and install the application:
$ git clone git@github.com:IonicaBizau/node-bug-killer.git bug-killer
$ cd bug-killer
$ npm install
Documentation
Methods
log(message, type)
Displays debug messages by providing the type.
message
(String): The debug message that should be displayedtype
(String): The message type (e.g. "error", "info" etc)
Returns the BugKiller instance
Other fields
_config
An object contaning the configuration of the module.
Default:
{
error: {
color: [255, 0, 0]
, text: "ERROR"
, level: 1
}
, warn: {
color: [200, 200, 0]
, text: "WARN"
, level: 2
}
, info: {
color: [0, 200, 255]
, text: "INFO"
, level: 3
}
, displayDate: true
, logLevel: 2
}
It can be extended to accept any type of message (see example).
Example
var Debug = require("../index");
Debug
.log("A fancy error message", "error")
.log("Info messages are useful", "info")
.log("Hey, you've got a warning", "warn")
;
Debug._config.displayDate = false;
Debug.log("Display date is disabled.", "info");
Debug._config.myType = {
color: [0, 255, 200]
, text: "CUSTOM"
};
Debug.log("This is a custom message type", "myType");
How to contribute
- File an issue in the repository, using the bug tracker, describing the
contribution you'd like to make. This will help us to get you started on the
right foot.
- Fork the project in your account and create a new branch:
your-great-feature
. - Commit your changes in that branch.
- Open a pull request, and reference the initial issue in the pull request
message.
Changelog
v0.1.1
v0.1.0
License
See the LICENSE file.