src/logger.js
function createLoggerStream(name, level, logglyConfig) {
    const streams = [process.stdout];
    if (logglyConfig.enabled) {
        const logglyStream = new LogglyStream({
            token: logglyConfig.token,
            subdomain: logglyConfig.subdomain,
            name,
            environment: logglyConfig.environment,
        });
        streams.push(logglyStream);
    }
    return new UnionStream({ streams });
}
function createLoggerStream(name, level, logglyConfig) {
    const streams = [process.stdout];
    if (logglyConfig.enabled) {
        const logglyStream = new LogglyStream({
            token: logglyConfig.token,
            subdomain: logglyConfig.subdomain,
            name,
            environment: logglyConfig.environment,
        });
        streams.push(logglyStream);
    }
    return new UnionStream({ streams });
}
function createLoggerStream ( name , level , logglyConfig ) { const streams = [ process . stdout ] ; if ( logglyConfig . enabled ) { const logglyStream = new LogglyStream ( { token : logglyConfig . token , subdomain : logglyConfig . subdomain , name , environment : logglyConfig . environment , } ) ; streams . push ( logglyStream ) ; } return new UnionStream ( { streams } ) ; }
singleton to create a logging instance based on config
singleton to create a logging instance based on config