Edit

Share via


Logger class

Class which facilitates logging of messages to a specific place.

Constructors

Logger(LoggerOptions, string, string)

Methods

clone(string, string, string)

Create new Logger with existing configurations.

error(string, string)

Logs error messages.

errorPii(string, string)

Logs error messages with PII.

executeCallback(LogLevel, string, boolean)

Execute callback with message.

info(string, string)

Logs info messages.

infoPii(string, string)

Logs info messages with PII.

isPiiLoggingEnabled()

Returns whether PII Logging is enabled or not.

trace(string, string)

Logs trace messages.

tracePii(string, string)

Logs trace messages with PII.

verbose(string, string)

Logs verbose messages.

verbosePii(string, string)

Logs verbose messages with PII.

warning(string, string)

Logs warning messages.

warningPii(string, string)

Logs warning messages with PII.

Constructor Details

Logger(LoggerOptions, string, string)

new Logger(loggerOptions: LoggerOptions, packageName?: string, packageVersion?: string)

Parameters

loggerOptions
@azure/msal-common.LoggerOptions
packageName

string

packageVersion

string

Method Details

clone(string, string, string)

Create new Logger with existing configurations.

function clone(packageName: string, packageVersion: string, correlationId?: string): Logger

Parameters

packageName

string

packageVersion

string

correlationId

string

Returns

error(string, string)

Logs error messages.

function error(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

errorPii(string, string)

Logs error messages with PII.

function errorPii(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

executeCallback(LogLevel, string, boolean)

Execute callback with message.

function executeCallback(level: LogLevel, message: string, containsPii: boolean)

Parameters

level
LogLevel
message

string

containsPii

boolean

info(string, string)

Logs info messages.

function info(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

infoPii(string, string)

Logs info messages with PII.

function infoPii(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

isPiiLoggingEnabled()

Returns whether PII Logging is enabled or not.

function isPiiLoggingEnabled(): boolean

Returns

boolean

trace(string, string)

Logs trace messages.

function trace(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

tracePii(string, string)

Logs trace messages with PII.

function tracePii(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

verbose(string, string)

Logs verbose messages.

function verbose(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

verbosePii(string, string)

Logs verbose messages with PII.

function verbosePii(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

warning(string, string)

Logs warning messages.

function warning(message: string, correlationId?: string)

Parameters

message

string

correlationId

string

warningPii(string, string)

Logs warning messages with PII.

function warningPii(message: string, correlationId?: string)

Parameters

message

string

correlationId

string