/**
 * Copyright 2018 Twitter, Inc.
 * Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 */ import { ConsoleLogger , AbstractLogger } from "../util/Logger" ; export interface LogProperties { [ key ] : any ; } export interface Logger { log ( level , props , format , ... param ) ; trace ( props , format , ... param ) ; debug ( props , format , ... param ) ; info ( props , format , ... param ) ; warn ( props , format , ... param ) ; error ( props , format , ... param ) ; fatal ( props , format , ... param ) ; } let currentLogger = new ConsoleLogger ( ) ; export class GlobalLogger extends AbstractLogger { log ( level , props , format , ... param ) { return currentLogger . log ( level , props , format , ... param ) ; } } const globalLogger = new GlobalLogger ( ) ; export function setGlobalLogger ( newLogger ) { currentLogger = newLogger ; } export function getGlobalLogger ( ) { return globalLogger ; }