mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[mongodb] Updated Logger class constructor. (#23140)
Changed parameter "options" of Logger class to optional.
This commit is contained in:
Vendored
+4
-4
@@ -1457,8 +1457,8 @@ export interface ChangeStreamOptions {
|
||||
type GridFSBucketWriteStreamId = string | number | Object | ObjectID;
|
||||
|
||||
export interface LoggerOptions {
|
||||
loggerLevel: string // Custom logger function
|
||||
logger: log // Override default global log level.
|
||||
loggerLevel?: string // Custom logger function
|
||||
logger?: log // Override default global log level.
|
||||
}
|
||||
|
||||
export type log = (message?: string, state?: LoggerState) => void
|
||||
@@ -1473,7 +1473,7 @@ export interface LoggerState {
|
||||
|
||||
/** http://mongodb.github.io/node-mongodb-native/3.0/api/Logger.html */
|
||||
export class Logger{
|
||||
constructor(className: string,options: LoggerOptions)
|
||||
constructor(className: string, options?: LoggerOptions)
|
||||
// Log a message at the debug level
|
||||
debug(message: string, state: LoggerState):void
|
||||
// Log a message at the warn level
|
||||
@@ -1497,7 +1497,7 @@ export class Logger{
|
||||
//Set the current logger function
|
||||
static setCurrentLogger(log: log):void
|
||||
// Set what classes to log.
|
||||
static filter(type: string,values: string[]):void
|
||||
static filter(type: string, values: string[]):void
|
||||
// Set the current log level
|
||||
static setLevel(level: string):void
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user