Skip to content

Commit

Permalink
feat(logger): add a method to get the context of the logger
Browse files Browse the repository at this point in the history
  • Loading branch information
christophehurpeau committed Jun 28, 2018
1 parent afba012 commit 0846714
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/nightingale-logger/src/index.ts
Expand Up @@ -69,7 +69,7 @@ function getConfigForLoggerRecord(key: string, recordLevel: number): ComputedCon
* This records are treated by handlers
*/
export default class Logger {
private contextObject?: Object;
private contextObject?: object;

/**
* Create a new Logger
Expand Down Expand Up @@ -122,6 +122,13 @@ export default class Logger {
return logger;
}

/**
* Get the context of this logger
*/
getContextObject(): Readonly<object> | undefined {
return this.contextObject;
}

/**
* Set the context of this logger
*
Expand Down

0 comments on commit 0846714

Please sign in to comment.