-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
BREAKINGissues that can cause breaking changesissues that can cause breaking changesenhancementNew feature or requestNew feature or request
Description
Currently we use log4js as the logger, but users may want to use other logging framework or implement logger themselves.
- Loggers are initialized in the
initlife cycle of the main thread. - Logger should be returned by a function as implemention of interfaces.
- Messages of the worker threads are sent to the main thread and logged by the worker of main thread.
- Logger initializer should only be invoked in the main thread.
- The dependency of log4js should probably removed with adapters, a default console-based implemention should be provided instead.
- This change should be considered breaking.
export interface Logger {
trace(type: LogType, ...contents: unknown[]): void;
debug(type: LogType, ...contents: unknown[]): void;
info(type: LogType, ...contents: unknown[]): void;
warn(type: LogType, ...contents: unknown[]): void;
error(type: LogType, ...contents: unknown[]): void;
}LogType may include:
- io
- http
- request
- response
- notFound
- retry
- disk
- mkdir
- http
- system
- skip
- skipExternal
- complete
- adjustConcurrency
- custom
Metadata
Metadata
Assignees
Labels
BREAKINGissues that can cause breaking changesissues that can cause breaking changesenhancementNew feature or requestNew feature or request