[mongodb] Updated Logger class constructor. (#23140)

Changed parameter "options" of Logger class to optional.
This commit is contained in:
Anton Myzenkov
2018-01-24 09:00:34 -08:00
committed by Andy
parent ca9d8d7e0f
commit 76a6216365
+4 -4
View File
@@ -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
}