Class: LoggerPlugin

plugins.LoggerPlugin

Logger plugin that handles all logging coming from the Webpack ecosystem, including compilation progress as well as debug logs from other plugins and resolvers.

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new LoggerPlugin(config)

Constructs new LoggerPlugin.

Parameters

Name Type Description
config LoggerPluginConfig Plugin configuration options.

Defined in

packages/repack/src/webpack/plugins/LoggerPlugin.ts:51

Properties

reporter

Readonly reporter: Reporter

Reporter instance used to actually writing logs to terminal/file.

Defined in

packages/repack/src/webpack/plugins/LoggerPlugin.ts:44

Methods

apply

apply(compiler): void

Apply the plugin.

Parameters

Name Type Description
compiler Compiler Webpack compiler instance.

Returns

void

Implementation of

WebpackPlugin.apply

Defined in

packages/repack/src/webpack/plugins/LoggerPlugin.ts:126


createEntry

createEntry(issuer, type, args, timestamp?): undefined | LogEntry

Create log entry from Webpack log message from WebpackLogger.

Parameters

Name Type Description
issuer string Issuer of the message.
type string Type of the message.
args any[] The body of the message.
timestamp? number Timestamp when the message was recorder.

Returns

undefined | LogEntry

Log entry object or undefined when if message is invalid.

Defined in

packages/repack/src/webpack/plugins/LoggerPlugin.ts:80


processEntry

processEntry(entry): void

Process log entry and pass it to reporter instance.

Parameters

Name Type Description
entry LogEntry Log entry to process

Returns

void

Defined in

packages/repack/src/webpack/plugins/LoggerPlugin.ts:105