import { Logger, LoggerOptions, TransportSingleOptions } from "pino";

//#region src/utils/logger.d.ts
declare function runWithLogContext<T>(bindings: Record<string, unknown>, fn: () => T): T;
/**
 * Configuration options for PinoLogger
 */
interface PinoLoggerConfig {
  /** Pino logger options */
  options?: LoggerOptions;
  /** Pino transport configuration */
  transportConfigs?: TransportSingleOptions[];
  /** Pre-built pino instance (used internally by .with()) */
  fromInstance?: Logger;
  /** When true, disables ALS proxying (used by .with() for snapshot semantics) */
  snapshot?: boolean;
}
/**
 * Pino logger implementation with transport customization support
 */
declare class PinoLogger {
  private name;
  private transportConfigs;
  private pinoInstance;
  private options;
  private alsChildCache;
  private isSnapshot;
  constructor(name: string, config?: PinoLoggerConfig);
  /**
   * Recreate the pino instance with current transports
   */
  private recreateInstance;
  /**
   * Add a new transport to the logger
   */
  addTransport(transportConfig: TransportSingleOptions): void;
  /**
   * Remove a transport by index
   */
  removeTransport(index: number): void;
  /**
   * Get current transports
   */
  getTransports(): TransportSingleOptions[];
  /**
   * Update logger options
   */
  updateOptions(options: Partial<LoggerOptions>): void;
  /**
   * Get the underlying pino instance for advanced usage
   */
  getPinoInstance(): Logger;
  private resolveInstance;
  /**
   * Creates a new PinoLogger with the given bindings baked in (snapshot semantics).
   * Captures the current ALS context at call time. The returned logger does NOT
   * pick up subsequent ALS context changes — use for class member loggers that
   * are constructed once and reused within a request scope.
   */
  with(bindings: Record<string, unknown>): PinoLogger;
  child(bindings: Record<string, unknown>): PinoLogger;
  error(message: string): void;
  error(data: any, message: string): void;
  warn(message: string): void;
  warn(data: any, message: string): void;
  info(message: string): void;
  info(data: any, message: string): void;
  debug(message: string): void;
  debug(data: any, message: string): void;
}
/**
 * Logger factory configuration
 */
interface LoggerFactoryConfig {
  defaultLogger?: PinoLogger;
  loggerFactory?: (name: string) => PinoLogger;
  /** Configuration for creating PinoLogger instances when using createPinoLoggerFactory */
  pinoConfig?: PinoLoggerConfig;
}
/**
 * Global logger factory singleton
 */
declare class LoggerFactory {
  private config;
  private loggers;
  /**
   * Configure the logger factory
   */
  configure(config: LoggerFactoryConfig): void;
  /**
   * Get or create a logger instance
   */
  getLogger(name: string): PinoLogger;
  /**
   * Reset factory to default state
   */
  reset(): void;
}
declare const loggerFactory: LoggerFactory;
/**
 * Convenience function to get a logger
 */
declare function getLogger(name: string): PinoLogger;
//#endregion
export { LoggerFactoryConfig, PinoLogger, PinoLoggerConfig, getLogger, loggerFactory, runWithLogContext };