"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isLogStage = exports.isLoggingLevel = exports.shouldWriteLogLevel = exports.LOG_LEVELS = exports.LOG_STAGES = void 0;
exports.LOG_STAGES = [
    'intake',
    'route',
    'auth',
    'dispatch',
    'upstream',
    'transform',
    'respond',
    'cleanup',
];
exports.LOG_LEVELS = ['error', 'warn', 'info', 'debug'];
const LOG_LEVEL_PRIORITY = {
    error: 0,
    warn: 1,
    info: 2,
    debug: 3,
};
function shouldWriteLogLevel(level, configuredLevel) {
    return LOG_LEVEL_PRIORITY[level] <= LOG_LEVEL_PRIORITY[configuredLevel];
}
exports.shouldWriteLogLevel = shouldWriteLogLevel;
function isLoggingLevel(value) {
    return typeof value === 'string' && exports.LOG_LEVELS.includes(value);
}
exports.isLoggingLevel = isLoggingLevel;
function isLogStage(value) {
    return typeof value === 'string' && exports.LOG_STAGES.includes(value);
}
exports.isLogStage = isLogStage;
//# sourceMappingURL=log-types.js.map