"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (streamParser) => {
    streamParser.on('data', (obj) => {
        if (obj.level !== 'error')
            return;
        console.log(obj['err'] && obj['err'].message || obj['message']); // tslint:disable-line
        if (obj['err'] && obj['err'] && obj['err'].stack) { // tslint:disable-line
            console.log(`\n${obj['err'].stack}`); // tslint:disable-line
        }
    });
};
