SessionLogger class

Default session logger used to log session activity to the console.

Properties

isEnabled

If true the logger is enabled and will log the sessions activity.

Methods

dump(string, any)

Logs the state of a variable to the output.

error(IDialogState[], Error)

Logs an error to the output.

flush((err: Error) => void)

Flushes any buffered entries to the output.

log(IDialogState[], string, any[])

Logs an informational level message to the output.

warn(IDialogState[], string, any[])

Logs a warning to the output.

Property Details

isEnabled

If true the logger is enabled and will log the sessions activity.

isEnabled: boolean

Property Value

boolean

Method Details

dump(string, any)

Logs the state of a variable to the output.

function dump(name: string, value: any)

Parameters

name

string

Name of the variable being logged.

value

any

Variables current state.

error(IDialogState[], Error)

Logs an error to the output.

function error(dialogStack: IDialogState[], err: Error)

Parameters

dialogStack

IDialogState[]

(Optional) dialog stack for the session. This is used to provide context for where the event occured.

err

Error

Error object to log. The errors message plus stack trace will be logged.

flush((err: Error) => void)

Flushes any buffered entries to the output.

function flush(callback: (err: Error) => void)

Parameters

callback

(err: Error) => void

Function to call when the operation is completed.

log(IDialogState[], string, any[])

Logs an informational level message to the output.

function log(dialogStack: IDialogState[], msg: string, args: any[])

Parameters

dialogStack

IDialogState[]

(Optional) dialog stack for the session. This is used to provide context for where the event occured.

msg

string

Message to log.

args

any[]

(Optional) arguments to log with the message.

warn(IDialogState[], string, any[])

Logs a warning to the output.

function warn(dialogStack: IDialogState[], msg: string, args: any[])

Parameters

dialogStack

IDialogState[]

(Optional) dialog stack for the session. This is used to provide context for where the event occured.

msg

string

Message to log.

args

any[]

(Optional) arguments to log with the message.