Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft > IScopedLogger

IScopedLogger interface

A logger which is used to emit errors and warnings to the console, as well as to write to the console. Messaged emitted by the scoped logger are prefixed with the name of the scoped logger.

Signature:

export interface IScopedLogger 

Properties

Property

Modifiers

Type

Description

hasErrors

readonly

boolean

Indicates if the logger has emitted any errors.

loggerName

readonly

string

The name of the scoped logger. Logging messages will be prefixed with this name.

terminal

readonly

ITerminal

The terminal used to write messages to the console.

Methods

Method

Description

emitError(error)

Call this function to emit an error to the heft runtime.

emitWarning(warning)

Call this function to emit an warning to the heft runtime.

resetErrorsAndWarnings()

Reset the errors and warnings for this scoped logger.