Skip to main content
Version: 3x

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): LoggerPlugin

Constructs new LoggerPlugin.

Parameters

NameTypeDescription
configLoggerPluginConfigPlugin configuration options.

Returns

LoggerPlugin

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

NameTypeDescription
compilerCompilerWebpack 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

NameTypeDescription
issuerstringIssuer of the message.
typestringType of the message.
argsany[]The body of the message.
timestamp?numberTimestamp 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

NameTypeDescription
entryLogEntryLog entry to process

Returns

void

Defined in

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