"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listDashboardLogEntries = exports.listDashboardLogSources = exports.updateDashboardLoggingConfig = exports.getDashboardLoggingConfig = void 0;
const logging_1 = require("../../services/logging");
const config_loader_facade_1 = require("../../config/config-loader-facade");
function getDashboardLoggingConfig() {
    return (0, logging_1.getResolvedLoggingConfig)();
}
exports.getDashboardLoggingConfig = getDashboardLoggingConfig;
function updateDashboardLoggingConfig(updates) {
    const updated = (0, config_loader_facade_1.mutateConfig)((config) => {
        config.logging = {
            ...(0, logging_1.getResolvedLoggingConfig)(),
            ...config.logging,
            ...updates,
        };
    });
    (0, logging_1.invalidateLoggingConfigCache)();
    return {
        ...(0, logging_1.getResolvedLoggingConfig)(),
        ...updated.logging,
    };
}
exports.updateDashboardLoggingConfig = updateDashboardLoggingConfig;
function listDashboardLogSources() {
    return (0, logging_1.readLogSourceSummaries)();
}
exports.listDashboardLogSources = listDashboardLogSources;
function listDashboardLogEntries(options = {}) {
    return (0, logging_1.readLogEntries)(options);
}
exports.listDashboardLogEntries = listDashboardLogEntries;
//# sourceMappingURL=logs-dashboard-service.js.map