0.3.2 • Published 6 years ago

floorine v0.3.2

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

floorine

Node.js/io.js logging thing.

Build Status

NPM version

Usage

All log statements log to stdout. Example output follows each log command.

var log = require("floorine");
log.set_log_level("debug");
log.debug("debugging stuff: %s", os.platform());
▫️  DEBUG 2015-02-18 15:12:48 UTC debugging stuff: linux
log.log("normal logging stuff");
▪️    LOG 2015-02-18 15:13:34 UTC normal logging stuff
log.warn("uh oh");
⚠️   WARN 2015-02-18 15:13:44 UTC uh oh
log.error("OH NO!");
🔥  ERROR 2015-02-18 15:13:52 UTC OH NO!

Emoji will probably be rendered differently in your terminal.

Configuration

The default log level is "log". Use set_log_level() to change it.

var log = require("floorine");
log.set_log_level("error");
log.log("this will not be logged");
log.error("...but this will be.");
🔥  ERROR 2015-02-18 15:13:52 UTC ...but this will be.

You can also tweak some formatting options. By default, log statements contain an emoji character indicating the level (▫️ , ▪️ , ⚠️ , 🔥) and terminal colors. Use set_config() to change these.

var log = require("floorine");
log.set_config({
  emoji: false,
  color: false,
});
log.log("boring.");
log.warn("boring!");
log.error("REALL BORING!");
    LOG 2015-02-18 15:13:52 UTC boring.
   WARN 2015-02-18 15:13:52 UTC boring!
  ERROR 2015-02-18 15:13:52 UTC REALLY BORING!

Values not given will remain unchanged.

0.3.2

6 years ago

0.3.0

9 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago