standard-log-console
Console support for standard-log
.
This is the default reporter of standard-log
.
Installation
In normal use case you don't need to reference this library directly.
standard-log
exports the main features from standard-log-console
.
yarn add standard-log
If you want to access other features from stand-log-console
, you can install it directly:
yarn add standard-log-console
Usage
By default, standard-log
will use this reporter by default.
If you want to configure standard-log
to use other reporters programatically,
you can use the createConsoleLogReporter()
to create the reporter for console:
config
By default, it will use ansi formatter in NodeJS and css formatter in browser.
If you want to change that, or use your own formatter:
createConsoleLogReporter
For createCssFormatter()
, you can specify how many colors to use:
createCssFormatter
You can also configure the timestamp
format:
createAnsiFormattercreateAnsiFormattercreateAnsiFormatter createCssFormattercreateCssFormattercreateCssFormatter