-
Notifications
You must be signed in to change notification settings - Fork 0
traits.Interface.DebugConfiguration
@zenstone/ts-utils / traits / DebugConfiguration
Defined in: src/traits/debuggable.ts:35
初始化时传入的调试配置,绑定在类原型上,所有实例共享,运行期不可变。
-
name— 显示在日志头部的模块名称,默认'Debug' -
color— name 的颜色值(仅色值,自动包装为color: <value>),如'#ff6b6b' -
style— name 的完整 CSS 样式字符串,优先级高于color,如'color: #ff6b6b; font-weight: bold' -
scopeColor— scope 的颜色值(同color规则) -
scopeStyle— scope 的完整 CSS 样式字符串,优先级高于scopeColor -
method— 输出方法:'log'(默认)、'debug',或自定义函数 -
timeFlag— 是否在日志头部追加时间戳;true使用内置格式,也可传自定义函数 -
format— 自定义头部格式函数,返回传给console.log的参数数组
[
key:string]:unknown
optionalcolor?:string
Defined in: src/traits/debuggable.ts:37
optionalformat?: (vars,styles) =>string[]
Defined in: src/traits/debuggable.ts:43
Record<string, string | null | undefined>
Record<string, string | null | undefined>
string[]
optionalmethod?:"log"|"debug"|DebugFunction
Defined in: src/traits/debuggable.ts:41
optionalname?:string
Defined in: src/traits/debuggable.ts:36
optionalscopeColor?:string
Defined in: src/traits/debuggable.ts:39
optionalscopeStyle?:string
Defined in: src/traits/debuggable.ts:40
optionalstyle?:string
Defined in: src/traits/debuggable.ts:38
optionaltimeFlag?:boolean|TimeFlagFunction
Defined in: src/traits/debuggable.ts:42