-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,66 @@ | ||
import { BaseLogger, ISettingsParam, ILogObj } from "./BaseLogger.js"; | ||
import { BaseLogger, ISettingsParam, ILogObj, ILogObjMeta } from "./BaseLogger.js"; | ||
export { ISettingsParam, BaseLogger, ILogObj }; | ||
|
||
|
||
export declare class Logger<LogObj> extends BaseLogger<LogObj> { | ||
constructor(settings?: ISettingsParam<LogObj>, logObj?: LogObj); | ||
|
||
|
||
/** | ||
* Logs a message with a custom log level. | ||
* @param logLevelId - Log level ID e.g. 0 | ||
* @param logLevelName - Log level name e.g. silly | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public log(logLevelId: number, logLevelName: string, ...args: unknown[]): (LogObj & ILogObjMeta & ILogObj) | undefined; | ||
|
||
/** | ||
* Logs a silly message. | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public silly(...args: unknown[]): (LogObj & ILogObjMeta) | undefined; | ||
|
||
/** | ||
* Logs a trace message. | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public trace(...args: unknown[]): (LogObj & ILogObjMeta) | undefined; | ||
|
||
/** | ||
* Logs a debug message. | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public debug(...args: unknown[]): (LogObj & ILogObjMeta) | undefined; | ||
|
||
/** | ||
* Logs an info message. | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public info(...args: unknown[]): (LogObj & ILogObjMeta) | undefined; | ||
|
||
/** | ||
* Logs a warn message. | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public warn(...args: unknown[]): (LogObj & ILogObjMeta) | undefined; | ||
|
||
/** | ||
* Logs an error message. | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public error(...args: unknown[]): (LogObj & ILogObjMeta) | undefined; | ||
|
||
/** | ||
* Logs a fatal message. | ||
* @param args - Multiple log attributes that should be logged out. | ||
*/ | ||
public fatal(...args: unknown[]): (LogObj & ILogObjMeta) | undefined; | ||
|
||
/** | ||
* Returns a child logger based on the current instance with inherited settings | ||
* | ||
* @param settings - Overwrite settings inherited from parent logger | ||
* @param logObj - Overwrite logObj for sub-logger | ||
*/ | ||
public getSubLogger(settings?: ISettingsParam<LogObj>, logObj?: LogObj): Logger<LogObj>; | ||
} |