"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldLogAzureSessionsAuth = shouldLogAzureSessionsAuth;
exports.logAzureSessionsAuth = logAzureSessionsAuth;
const logger_1 = __importDefault(require("../../logger"));
/** Dev diagnostics for Azure Sessions token acquisition (never logs the raw token). */
function shouldLogAzureSessionsAuth() {
    if (process.env.AZURE_SESSIONS_AUTH_DEBUG === '1' ||
        process.env.AZURE_SESSIONS_AUTH_DEBUG === 'true') {
        return true;
    }
    return process.env.NODE_ENV !== 'production';
}
function logAzureSessionsAuth(message, details) {
    if (!shouldLogAzureSessionsAuth()) {
        return;
    }
    const suffix = details && Object.keys(details).length > 0 ? ` ${JSON.stringify(details)}` : '';
    logger_1.default.info(`[Azure Sessions auth] ${message}${suffix}`);
}
//# sourceMappingURL=authLogging.js.map