Skip to content

Commit

Permalink
remove unnecessary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
aoberoi committed Feb 16, 2019
1 parent 8066a42 commit 4d532fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logger.ts
Expand Up @@ -177,13 +177,13 @@ export function getLogger(name: string, level: LogLevel, existingLogger?: Logger
/**
* INTERNAL function for transforming an external LoggingFunc type into the Logger interface.
*/
export function loggerFromLoggingFunc(name: string, loggingFunc: LoggingFunc, level?: LogLevel): Logger {
export function loggerFromLoggingFunc(name: string, loggingFunc: LoggingFunc, level: LogLevel): Logger {
// Get a unique ID for the logger.
const instanceId = instanceCount;
instanceCount += 1;

let loggerName = `${name}:${instanceId}`;
let loggerLevel = level !== undefined ? level : LogLevel.INFO;
let loggerLevel = level;

// Set up the logger.
const logger: Logger = {
Expand Down

0 comments on commit 4d532fa

Please sign in to comment.