airbnbapi icon indicating copy to clipboard operation
airbnbapi copied to clipboard

Loglevel debug is not showing log.e()

Open timaschew opened this issue 5 years ago • 1 comments

https://github.com/zxol/airbnbapi/blob/3ff80755f35be3818db8000bfcca2a92190f2202/src/log.js#L9

There debug should also be added in that line, right?

timaschew avatar Feb 20 '20 14:02 timaschew

I would expect this:

const log = {
    e: obj => {
        if (LOGLEVEL === 'error' || LOGLEVEL === 'info' || LOGLEVEL === 'debug') {
            console.error(obj);
        }
    },
    i: obj => {
        if (LOGLEVEL === 'info' || LOGLEVEL === 'debug') {
            console.log(obj);
        }
    },
    d: obj => {
        if (LOGLEVEL === 'debug') {
            console.error(obj);
        }
    }
};

timaschew avatar Feb 20 '20 14:02 timaschew