lib/tubesio/logging.js
function Logger(level) {
    if (_.isString(level) && _.has(LogLevel, level)) {
        this.level = LogLevel[level];    
    } else if (_.isNumber(level) && level >= 0 && level <= 4) {
        this.level = level;
    } else {
        this.level = LogLevel.info;
    }    
}
function Logger(level) {
    if (_.isString(level) && _.has(LogLevel, level)) {
        this.level = LogLevel[level];    
    } else if (_.isNumber(level) && level >= 0 && level <= 4) {
        this.level = level;
    } else {
        this.level = LogLevel.info;
    }    
}
function Logger ( level ) { if ( _ . isString ( level ) && _ . has ( LogLevel , level ) ) { this . level = LogLevel [ level ] ; } else if ( _ . isNumber ( level ) && level >= 0 && level <= 4 ) { this . level = level ; } else { this . level = LogLevel . info ; } }
Logger that logs exclusively to stderr so that logging doesn't pollute the
scraper result which is written to stdout.
Logger that logs exclusively to stderr so that logging doesn t pollute the scraper result which is written to stdout .