Class: logger
index / logger
Class: logger
日志打印器
Remarks
单例对象打印名为 default
支持多实例
打印等级控制
打印屏蔽控制
报错日志 http 上传
Hierarchy
↳
logger
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new logger(name_s_
)
Parameters
Name | Type |
---|---|
name_s_ | string |
Overrides
Defined in
assets/@framework/mk_logger.ts:63
Properties
config
▪ Static
config: global_config
全局配置
Defined in
assets/@framework/mk_logger.ts:151
Methods
only
▸ Static
only(module_ss_
): void
只限模块打印
Parameters
Name | Type | Description |
---|---|---|
module_ss_ | string [] | 模块名列表 |
Returns
void
Remarks
调用时会覆盖 mk_logger.limit 的规则
Defined in
assets/@framework/mk_logger.ts:197
limit
▸ Static
limit(module_ss_
): void
限制模块打印
Parameters
Name | Type | Description |
---|---|---|
module_ss_ | string [] | 模块名列表 |
Returns
void
Remarks
调用时会覆盖 mk_logger.only 的规则
Defined in
assets/@framework/mk_logger.ts:208
debug
▸ debug(...args_as_
): void
Parameters
Name | Type |
---|---|
...args_as_ | any [] |
Returns
void
Defined in
assets/@framework/mk_logger.ts:263
log
▸ log(...args_as_
): void
Parameters
Name | Type |
---|---|
...args_as_ | any [] |
Returns
void
Defined in
assets/@framework/mk_logger.ts:267
warn
▸ warn(...args_as_
): void
Parameters
Name | Type |
---|---|
...args_as_ | any [] |
Returns
void
Defined in
assets/@framework/mk_logger.ts:271
error
▸ error(...args_as_
): void
Parameters
Name | Type |
---|---|
...args_as_ | any [] |
Returns
void
Defined in
assets/@framework/mk_logger.ts:275
time_start
▸ time_start(name_s_
, ...args_as_
): void
计时开始
Parameters
Name | Type |
---|---|
name_s_ | string |
...args_as_ | any [] |
Returns
void
Defined in
assets/@framework/mk_logger.ts:280
time_log
▸ time_log(name_s_
, ...args_as_
): void
打印耗时
Parameters
Name | Type |
---|---|
name_s_ | string |
...args_as_ | any [] |
Returns
void
Defined in
assets/@framework/mk_logger.ts:297
time_end
▸ time_end(name_s_
, ...args_as_
): void
总耗时
Parameters
Name | Type |
---|---|
name_s_ | string |
...args_as_ | any [] |
Returns
void