Logger中LogType枚举对外开放,可方便控制日志打印开关

This commit is contained in:
dgflash
2022-12-12 12:03:29 +08:00
parent a60d438d00
commit b2dc843532

View File

@@ -1,6 +1,6 @@
import { log } from "cc";
enum LogType {
export enum LogType {
/** 网络层日志 */
Net = 1,
/** 数据结构层日志 */
@@ -52,8 +52,10 @@ export class Logger {
* @example
oops.log.setTags(LogType.View|LogType.Business)
*/
static setTags(tag: LogType = 0) {
this.tags = tag;
static setTags(tag: LogType = null!) {
if (tag) {
this.tags = tag;
}
}
/**