# Function createAuditLogger

Audit exports - Structured audit logging (Issue #193) Split from index.ts for file size compliance (Issue #285)

- createAuditLogger(
  config: {
  logDir: string;
  filePrefix: string;
  maxFileSizeBytes: number;
  maxFiles: number;
  enableHashChain: boolean;
  enableCompression: boolean;
  flushIntervalMs: number;
  minSeverity: "info" | "warning" | "critical";
  categories?: (
  | "authorization"
  | "system"
  | "configuration"
  | "security"
  | "authentication"
  | "tool_invocation"
  | "data_access"
  | "data_modification"
  )[];
  },
  storage?: IAuditStorage,
  logger?: ILogger,
  ): AuditLogger

  #### Parameters

  - config: {
    logDir: string;
    filePrefix: string;
    maxFileSizeBytes: number;
    maxFiles: number;
    enableHashChain: boolean;
    enableCompression: boolean;
    flushIntervalMs: number;
    minSeverity: "info" | "warning" | "critical";
    categories?: (
    | "authorization"
    | "system"
    | "configuration"
    | "security"
    | "authentication"
    | "tool_invocation"
    | "data_access"
    | "data_modification"
    )[];
    }
  - `Optional` storage: IAuditStorage
  - `Optional` logger: ILogger

  #### Returns AuditLogger

  - Defined in packages/nexus-agents/src/audit/audit-logger.ts:383