Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
A small, flexible and easy-to-use logging library for node.js
var hewer = require('hewer');
var Logger = new hewer.Logger();
Logger.log({ // A JSON of data to be logged
'name' : 'Aragorn',
'class' : 'Ranger'
})
.with('level', '99') // Add more meta data
.with('kingdom', 'Gondor') // And a few more meta data
.info('Here comes the king');
// 2016-04-05T03:32:15.604Z INFO Here comes the king {"name":"Aragorn","class":"Ranger","level":"99","kingdom":"Gondor"}
Logger(filters, writers, formatter)
filters
: Array of Filter
- OPTIONAL
- A list of filters that will be applied to the log message.writers
: Array of Writer
- OPTIONAL
- A list of writers that will be used to write the log message to some output. If no writer is provided then the ConsoleWriter
will be used.formatter
: Formatter
- OPTIONAL
- A formatter that may transform and format the message before sending it to a writer. If no formatter is provided then the DefaultFormatter
will be used.Logger.log(meta)
returns Log
Creates a new log instance with the optional provided meta data.
meta
: JSON
- OPTIONAL
- A JSON with a any arbitrary meta.Log.with(key, value)
returns Log
Appends some meta data to the log.
key
: STRING
- MANDATORY
- The name of your meta data.value
: ANY
- MANDATORY
- Your actual data.Log.info(message)
returns Promise
Commits the message
and the meta
provided to the set of writers with log level INFO
.
message
: STRING
- `OPTIONAL - Some arbitrary log message.Log.warn(message)
returns Promise
Just like Log.info
but with log level WARN
.
Log.error(message)
returns Promise
Just like Log.info
but with log level ERROR
.
Log.debug(message)
returns Promise
Just like Log.info
but with log level DEBUG
.
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
FAQs
A small, flexible, zero-dependency logging library
The npm package hewer receives a total of 0 weekly downloads. As such, hewer popularity was classified as not popular.
We found that hewer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.