import { IChannel } from "./IChannel" ; /**
 * Class allowing mixing several channels.
 */ export class MultiChannel implements IChannel { private readonly channels : IChannel [ ] = [ ] ; constructor ( ... channels ) { this . channels = channels ; } error ( message ? , ... optionalParams ) { for ( const channel of this . channels ) { channel . error ( message , ... optionalParams ) ; } } debug ( message ? , ... optionalParams ) { for ( const channel of this . channels ) { channel . debug ( message , ... optionalParams ) ; } } info ( message ? , ... optionalParams ) { for ( const channel of this . channels ) { channel . info ( message , ... optionalParams ) ; } } log ( message ? , ... optionalParams ) { for ( const channel of this . channels ) { channel . log ( message , ... optionalParams ) ; } } trace ( message ? , ... optionalParams ) { for ( const channel of this . channels ) { channel . trace ( message , ... optionalParams ) ; } } warn ( message ? , ... optionalParams ) { for ( const channel of this . channels ) { channel . warn ( message , ... optionalParams ) ; } } }