@weapp-core/logger 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +10 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,17 @@ import { ConsolaInstance } from 'consola';
|
|
|
3
3
|
type LogType = 'error' | 'warn' | 'info';
|
|
4
4
|
type LogLevel = LogType | 'silent';
|
|
5
5
|
interface LoggerConfig {
|
|
6
|
+
/**
|
|
7
|
+
* @description 全局日志级别
|
|
8
|
+
* @example
|
|
9
|
+
* level: 'info'
|
|
10
|
+
*/
|
|
6
11
|
level?: LogLevel;
|
|
12
|
+
/**
|
|
13
|
+
* @description 按 tag 覆盖日志级别
|
|
14
|
+
* @example
|
|
15
|
+
* tags: { build: 'warn', npm: 'silent' }
|
|
16
|
+
*/
|
|
7
17
|
tags?: Record<string, LogLevel | undefined>;
|
|
8
18
|
}
|
|
9
19
|
declare function configureLogger(config?: LoggerConfig): void;
|