"use strict";
/*
 * @poppinss/utils
 *
 * (c) Harminder Virk <virk@adonisjs.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemoryRenderer = void 0;
/**
 * Keeps log messages within memory. Useful for testing
 */
class MemoryRenderer {
    constructor() {
        this.logs = [];
    }
    /**
     * Log message
     */
    log(message) {
        this.logs.push({ message, stream: 'stdout' });
    }
    /**
     * For memory renderer the logUpdate is similar to log
     */
    logUpdate(message) {
        this.log(message);
    }
    /**
     * Its a noop
     */
    logUpdateDone() { }
    /**
     * Log message as error
     */
    logError(message) {
        this.logs.push({ message, stream: 'stderr' });
    }
}
exports.MemoryRenderer = MemoryRenderer;
