UNPKG

@openai/agents-core

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

25 lines 758 B
import debug from 'debug'; import { logging } from "./config.mjs"; /** * Get a logger for a given package. * * @param namespace - the namespace to use for the logger. * @returns A logger object with `debug` and `error` methods. */ export function getLogger(namespace = 'openai-agents') { return { namespace, debug: debug(namespace), error: (...args) => console.error(...args), warn: (...args) => console.warn(...args), get dontLogModelData() { return logging.dontLogModelData; }, get dontLogToolData() { return logging.dontLogToolData; }, }; } export const logger = getLogger('openai-agents:core'); export default logger; //# sourceMappingURL=logger.mjs.map