Class: 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:43

Properties

reporter

Readonly reporter: Reporter

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

Defined in

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

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:108


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:62


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:87