webpack-log

WebJar for webpack-log

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

webpack-log
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

webpack-log
WebJar for webpack-log
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/webpack-contrib/webpack-log

Download webpack-log

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/webpack-log/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>webpack-log</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/webpack-log/
implementation 'org.webjars.npm:webpack-log:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/webpack-log/
implementation ("org.webjars.npm:webpack-log:2.0.0")
'org.webjars.npm:webpack-log:jar:2.0.0'
<dependency org="org.webjars.npm" name="webpack-log" rev="2.0.0">
  <artifact name="webpack-log" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='webpack-log', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "webpack-log" % "2.0.0"
[org.webjars.npm/webpack-log "2.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : ansi-colors jar [3.0.0,4)
org.webjars.npm : uuid jar [3.3.2,4)

Project Modules

There are no modules declared in this project.

[DEPRECATED] Plese use logger api https://github.com/webpack/webpack/pull/9436

npm node deps test coverage chat

webpack Log

A common logging module for the webpack ecosystem

Install

npm i -D webpack-log

⚠️ We do not recommend installing this module globally

Usage

const log = require('webpack-log');
const logger = log({ name: 'wds' });

logger.info('Server Starting');

output

ℹ️ The logger returned is unique by default, due to the nature of the webpack ecosystem. Please reference the unique option below for disabling this feature and to force caching

Options

Name Type Default Description
name {String} ''<unknown>' Log Name (Required)
level {String} 'info' Log Level
unique {Boolean} true Log Uniqueness
timestamp {Boolean} false Log Timestamps

name

Specifies the name of the log to create. This option is required, and used to differentiate between loggers when webpack-log is used in multiple projects executing in the same process

const logger = log({ name: 'wds' });

level

Specifies the level the logger should use. A logger will not produce output for any log level beneath the specified level. Available levels and order are:

['info', 'warn', 'error', 'trace', 'debug', 'silent'];
const logger = log({ level: 'error' });

logger.error(err);

ℹ️ The level names shown above correspond to the available logging methods, with the notable exception of the silent level

unique

If false, instructs the logger to used cached versions of a log with the same name. Due to the nature of the webpack ecosystem and multiple plugin/loader usage in the same process, loggers are created as unique instances by default. By passing false for this property, the module is instructed to cache the requested logger

const logger = log({ unique: true });

timestamp

If true, instructs the logger to display a timestamp for log output, preceding all other data

const logger = log({ timestamp: true });
org.webjars.npm

webpack-contrib

Community supported 3rd party packages for webpack

Versions

Version
2.0.0
1.2.0