/**
 * Logging Types
 *
 * Type definitions for the file-based logging infrastructure.
 */

/**
 * Log severity levels.
 */
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';

/**
 * A single log entry with metadata.
 */
export interface LogEntry {
  /** When this entry was logged */
  timestamp: Date;
  /** Severity level */
  level: LogLevel;
  /** ID of the process that produced this log */
  processId: string;
  /** The log message content */
  message: string;
}

/**
 * Configuration for the logging system.
 */
export interface LogConfig {
  /** Base directory for log files. Defaults to ~/.cw/logs */
  baseDir: string;
  /** Maximum size per log file in bytes before rotation. Optional. */
  maxFileSize?: number;
  /** Number of days to retain logs. Optional. */
  retainDays?: number;
}

/**
 * Stream type for log output.
 */
export type LogStream = 'stdout' | 'stderr';
