Skip to content

Commit

Permalink
fix: configure NullLogger as default logger (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 committed Apr 11, 2023
1 parent 2e6b85e commit a5dd35e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/logger.ts
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

import {Logger} from './types';
let logger: Logger;

class NullLogger implements Logger {
error = () => {};
Expand All @@ -23,6 +22,8 @@ class NullLogger implements Logger {
trace = () => {};
}

let logger: Logger = new NullLogger();

function setupLogger(userLogger?: Logger) {
if (userLogger) {
logger = userLogger;
Expand Down

0 comments on commit a5dd35e

Please sign in to comment.