lib/Common.transport.js
function CommonTransport( logger , config = {} ) {
	this.logger = null ;
	this.monitoring = false ;
	this.minLevel = 0 ;
	this.maxLevel = 7 ;
	this.messageFormatter = logger.messageFormatter.text ;
	this.timeFormatter = logger.timeFormatter.dateTime ;

	Object.defineProperty( this , 'logger' , { value: logger } ) ;

	if ( config.monitoring !== undefined ) { this.monitoring = !! config.monitoring ; }

	if ( config.minLevel !== undefined ) {
		if ( typeof config.minLevel === 'number' ) { this.minLevel = config.minLevel ; }
		else if ( typeof config.minLevel === 'string' ) { this.minLevel = this.logger.levelHash[ config.minLevel ] ; }
	}

	if ( config.maxLevel !== undefined ) {
		if ( typeof config.maxLevel === 'number' ) { this.maxLevel = config.maxLevel ; }
		else if ( typeof config.maxLevel === 'string' ) { this.maxLevel = this.logger.levelHash[ config.maxLevel ] ; }
	}

	if ( config.messageFormatter ) {
		if ( typeof config.messageFormatter === 'function' ) { this.messageFormatter = config.messageFormatter ; }
		else { this.messageFormatter = this.logger.messageFormatter[ config.messageFormatter ] ; }
	}

	if ( config.timeFormatter ) {
		if ( typeof config.timeFormatter === 'function' ) { this.timeFormatter = config.timeFormatter ; }
		else { this.timeFormatter = this.logger.timeFormatter[ config.timeFormatter ] ; }
	}
}
function CommonTransport( logger , config = {} ) {
	this.logger = null ;
	this.monitoring = false ;
	this.minLevel = 0 ;
	this.maxLevel = 7 ;
	this.messageFormatter = logger.messageFormatter.text ;
	this.timeFormatter = logger.timeFormatter.dateTime ;

	Object.defineProperty( this , 'logger' , { value: logger } ) ;

	if ( config.monitoring !== undefined ) { this.monitoring = !! config.monitoring ; }

	if ( config.minLevel !== undefined ) {
		if ( typeof config.minLevel === 'number' ) { this.minLevel = config.minLevel ; }
		else if ( typeof config.minLevel === 'string' ) { this.minLevel = this.logger.levelHash[ config.minLevel ] ; }
	}

	if ( config.maxLevel !== undefined ) {
		if ( typeof config.maxLevel === 'number' ) { this.maxLevel = config.maxLevel ; }
		else if ( typeof config.maxLevel === 'string' ) { this.maxLevel = this.logger.levelHash[ config.maxLevel ] ; }
	}

	if ( config.messageFormatter ) {
		if ( typeof config.messageFormatter === 'function' ) { this.messageFormatter = config.messageFormatter ; }
		else { this.messageFormatter = this.logger.messageFormatter[ config.messageFormatter ] ; }
	}

	if ( config.timeFormatter ) {
		if ( typeof config.timeFormatter === 'function' ) { this.timeFormatter = config.timeFormatter ; }
		else { this.timeFormatter = this.logger.timeFormatter[ config.timeFormatter ] ; }
	}
}
function CommonTransport ( logger , config = { } ) { this . logger = null ; this . monitoring = false ; this . minLevel = 0 ; this . maxLevel = 7 ; this . messageFormatter = logger . messageFormatter . text ; this . timeFormatter = logger . timeFormatter . dateTime ; Object . defineProperty ( this , 'logger' , { value : logger } ) ; if ( config . monitoring !== undefined ) { this . monitoring = ! ! config . monitoring ; } if ( config . minLevel !== undefined ) { if ( typeof config . minLevel === 'number' ) { this . minLevel = config . minLevel ; } else if ( typeof config . minLevel === 'string' ) { this . minLevel = this . logger . levelHash [ config . minLevel ] ; } } if ( config . maxLevel !== undefined ) { if ( typeof config . maxLevel === 'number' ) { this . maxLevel = config . maxLevel ; } else if ( typeof config . maxLevel === 'string' ) { this . maxLevel = this . logger . levelHash [ config . maxLevel ] ; } } if ( config . messageFormatter ) { if ( typeof config . messageFormatter === 'function' ) { this . messageFormatter = config . messageFormatter ; } else { this . messageFormatter = this . logger . messageFormatter [ config . messageFormatter ] ; } } if ( config . timeFormatter ) { if ( typeof config . timeFormatter === 'function' ) { this . timeFormatter = config . timeFormatter ; } else { this . timeFormatter = this . logger . timeFormatter [ config . timeFormatter ] ; } } }
Empty constructor, it is just there to support instanceof operator
Empty constructor it is just there to support instanceof operator