npm.io
0.0.3 • Published 8 years ago

unlog

Licence
MIT
Version
0.0.3
Deps
1
Vulns
0
Weekly
0

unlog - Unified Logging

Supported Languages:

Planned Languages:

  • C / C++
  • Python

Bash

Also compatible with: zsh, sh. Other shells might also work but are untested.

source src/unlog.sh

log "This is a simple log message."
warn "This is a warning!"
error "This is an error!"

# Also works for pipes
cat log_messages | log
cat warnings | warn
cat errors | error

JavaScript

var unlog = require("src/unlog");

unlog.log("This is a simple log message.");
unlog.warn("This is a warning!");
unlog.error("This is an error!");
TypeScript
import * as unlog from 'src/unlog';

unlog.log("This is a simple log message.");
unlog.warn("This is a warning!");
unlog.error("This is an error!");
Makefile
include src/unlog.mk

all:
    $(LOG) "This is a simple log message."
    $(WARN) "This is a warning!"
    $(ERROR) "This is an error!"