From b2dc8435329c814e864ddd717e2cb04f462894e7 Mon Sep 17 00:00:00 2001 From: dgflash Date: Mon, 12 Dec 2022 12:03:29 +0800 Subject: [PATCH] =?UTF-8?q?Logger=E4=B8=ADLogType=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E5=AF=B9=E5=A4=96=E5=BC=80=E6=94=BE=EF=BC=8C=E5=8F=AF=E6=96=B9?= =?UTF-8?q?=E4=BE=BF=E6=8E=A7=E5=88=B6=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/core/common/log/Logger.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/core/common/log/Logger.ts b/assets/core/common/log/Logger.ts index 98d6b32..6ed20ad 100644 --- a/assets/core/common/log/Logger.ts +++ b/assets/core/common/log/Logger.ts @@ -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; + } } /**