|
3 | 3 | * @param {LogOptionsWithCustomLog} [options] |
4 | 4 | */ |
5 | 5 | export function initProcLog(options?: LogOptionsWithCustomLog): void; |
| 6 | +/** @typedef {import('./utils.js').Level} Level */ |
| 7 | +/** @typedef {import('./node.js').LogOptions} LogOptions */ |
| 8 | +/** @typedef {LogOptions & {Log: typeof Log}} LogOptionsWithCustomLog */ |
6 | 9 | /** |
7 | | - * @typedef {import('./node.js').LogOptions} LogOptions |
8 | | - */ |
9 | | -/** |
10 | | - * @typedef {LogOptions & {Log: typeof Log}} LogOptionsWithCustomLog |
| 10 | + * @typedef {object} ProcLogOptions |
| 11 | + * @property {Level} [level] log level |
| 12 | + * @property {string} [namespaces] namespaces for logging |
11 | 13 | */ |
12 | 14 | export const EVENT_NAME: "log-level"; |
13 | 15 | /** |
@@ -44,14 +46,25 @@ export const EVENT_NAME: "log-level"; |
44 | 46 | export class ProcLog extends LogBase { |
45 | 47 | /** |
46 | 48 | * creates a new logger |
47 | | - * @param {String} name - namespace of Logger |
48 | | - * @param {LogOptions} [opts] - see Log.options |
| 49 | + * @param {string} name - namespace of Logger |
| 50 | + * @param {ProcLogOptions} [opts] - see Log.options |
49 | 51 | */ |
50 | | - constructor(name: string, opts?: LogOptions); |
| 52 | + constructor(name: string, opts?: ProcLogOptions); |
51 | 53 | } |
| 54 | +export type Level = import("./utils.js").Level; |
52 | 55 | export type LogOptions = import("./node.js").LogOptions; |
53 | 56 | export type LogOptionsWithCustomLog = LogOptions & { |
54 | 57 | Log: typeof Log; |
55 | 58 | }; |
| 59 | +export type ProcLogOptions = { |
| 60 | + /** |
| 61 | + * log level |
| 62 | + */ |
| 63 | + level?: import("./utils.js").Level | undefined; |
| 64 | + /** |
| 65 | + * namespaces for logging |
| 66 | + */ |
| 67 | + namespaces?: string | undefined; |
| 68 | +}; |
56 | 69 | import { LogBase } from './LogBase.js'; |
57 | 70 | import { Log } from './node.js'; |
0 commit comments