ara-console
v0.3.0
Published
Logging functions for Ara modules so logging is consistent.
Downloads
35
Readme
ara-console
Logging functions for Ara modules to ensure consistent console logs.
Status
Stable
Installation
$ npm install arablocks/ara-console
Example
Print out examples of all logs.
$ node example.js
API
console = require('ara-console')([label])
This module exports a series of utility logging functions for use in several Ara modules.
console.log(stream, prefix, format, ...message)
Writes a formatted message with a prefix to a given
stream like stdout
or stderr
.
const { log } = require('ara-console')
log(process.stdout, 'info: ', '%s %s', someMessage, otherMessage)
console.error(format, ...message)
Prints a formatted error message to stderr
.
const { error } = require('ara-console')
error("fatal: ", someMessage)
console.info(format, ...message)
Prints a formatted info message to stdout
.
const { info } = require('ara-console')
info("fatal: ", someMessage)
console.warn(format, ...message)
Prints a formatted warn message to stderr
.
const { warn } = require('ara-console')
warn("fatal: ", someMessage)
Contributing
Releases follow Semantic Versioning
See Also
License
LGPL-3.0