0.0.3 • Published 6 years ago
unlog v0.0.3
unlog - Unified Logging
Supported Languages:
- Bash (also tested: zsh, sh)
- JavaScript
- TypeScript
- Makefile
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!"