ain2-wrapper
Super simple wrapper for the ain2 logger
Last updated 4 years ago by slooker .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ain2-wrapper 
SYNC missed versions from official npm registry.

== Ain 2 Wrapper ==

This just creates a simple wrapper around ain2 that instantiates an object. It was created mostly because I didn't want to override console.

You can use it like below:

let logger = require('ain2-wrapper')();

logger.warn("This is a warning.");
// This will output "WARN - This is a warning."

This supports the same log levels as ain. Severity level is referenced to RFC3164

#  String   Description
-----------------------
0  emerg    Emergency: system is unusable
1  alert    Alert: action must be taken immediately
2  crit     Critical: critical conditions
3  err      Error: error conditions
4  warn     Warning: warning conditions
5  notice   Notice: normal but significant condition
6  info     Informational: informational messages
7  debug    Debug: debug-level messages

Note that OSX uses a non standard syslog, and this likely won't work in any mode other than "development" on a mac.

Current Tags

  • 1.0.1                                ...           latest (4 years ago)

2 Versions

  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |