"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.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConsoleRenderer = void 0;
const log_update_1 = __importDefault(require("log-update"));
/**
 * Renders messages to the "stdout" and "stderr"
 */
class ConsoleRenderer {
    log(message) {
        console.log(message);
    }
    /**
     * Log message by overwriting the existing one
     */
    logUpdate(message) {
        (0, log_update_1.default)(message);
    }
    /**
     * Persist the last logged message
     */
    logUpdateDone() {
        log_update_1.default.done();
    }
    /**
     * Log error
     */
    logError(message) {
        console.error(message);
    }
}
exports.ConsoleRenderer = ConsoleRenderer;
