通过


SessionLogger class

用于将会话活动记录到控制台的默认会话记录器。

属性

isEnabled

如果为 true,则启用记录器并将记录会话活动。

方法

dump(string, any)

将变量的状态记录到输出中。

error(IDialogState[], Error)

将错误记录到输出。

flush((err: Error) => void)

将任何缓冲的条目刷新到输出。

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

将信息级别消息记录到输出。

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

将警告记录到输出。

属性详细信息

isEnabled

如果为 true,则启用记录器并将记录会话活动。

isEnabled: boolean

属性值

boolean

方法详细信息

dump(string, any)

将变量的状态记录到输出中。

function dump(name: string, value: any)

参数

name

string

要记录的变量的名称。

value

any

变量当前状态。

error(IDialogState[], Error)

将错误记录到输出。

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

参数

dialogStack

IDialogState[]

(可选)会话的对话框堆栈。 这用于提供发生事件的上下文。

err

Error

要记录的错误对象。 将记录错误消息和堆栈跟踪。

flush((err: Error) => void)

将任何缓冲的条目刷新到输出。

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

参数

callback

(err: Error) => void

完成作时要调用的函数。

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

将信息级别消息记录到输出。

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

参数

dialogStack

IDialogState[]

(可选)会话的对话框堆栈。 这用于提供发生事件的上下文。

msg

string

要记录的消息。

args

any[]

(可选)用于记录消息的参数。

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

将警告记录到输出。

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

参数

dialogStack

IDialogState[]

(可选)会话的对话框堆栈。 这用于提供发生事件的上下文。

msg

string

要记录的消息。

args

any[]

(可选)用于记录消息的参数。