"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Create a console-based fallback logger for non-blocklet environments
const consoleLogger = {
    info: (...args) => console.log("[observability]", ...args),
    warn: (...args) => console.warn("[observability]", ...args),
    error: (...args) => console.error("[observability]", ...args),
    debug: (...args) => console.debug("[observability]", ...args),
    log: (...args) => console.log("[observability]", ...args),
};
let logger = consoleLogger;
// Only use @blocklet/logger if BLOCKLET_LOG_DIR is set
if (process.env.BLOCKLET_LOG_DIR) {
    try {
        // Dynamic import to avoid throwing at module load time
        const createLogger = require("@blocklet/logger").default;
        logger = createLogger("observability");
    }
    catch {
        // Fall back to console logger
    }
}
exports.default = logger;
