# Interface ILogger

Logger interface

interface ILogger {
debug(message: string, context?: LogContext): void;
info(message: string, context?: LogContext): void;
warn(message: string, context?: LogContext): void;
error(message: string, error?: Error, context?: LogContext): void;
child(context: LogContext): ILogger;
setLevel(level: LogLevel): void;
setFormat?: (format: LogFormat) => void;
setDestination?: (destination: LogDestination, filePath?: string) => void;
}

- Defined in packages/nexus-agents/src/core/logger.ts:37

##### Index

### Properties

setFormat?
setDestination?

### Methods

debug
info
warn
error
child
setLevel

## Properties

### `Optional` setFormat

setFormat?: (format: LogFormat) => void

Set output format (json or pretty) - optional for backward compatibility

- Defined in packages/nexus-agents/src/core/logger.ts:45

### `Optional` setDestination

setDestination?: (destination: LogDestination, filePath?: string) => void

Set output destination (stdout, stderr, or file) - optional for backward compatibility

- Defined in packages/nexus-agents/src/core/logger.ts:47

## Methods

### debug

- debug(message: string, context?: LogContext): void

  #### Parameters

  - message: string
  - `Optional` context: LogContext

  #### Returns void

  - Defined in packages/nexus-agents/src/core/logger.ts:38

### info

- info(message: string, context?: LogContext): void

  #### Parameters

  - message: string
  - `Optional` context: LogContext

  #### Returns void

  - Defined in packages/nexus-agents/src/core/logger.ts:39

### warn

- warn(message: string, context?: LogContext): void

  #### Parameters

  - message: string
  - `Optional` context: LogContext

  #### Returns void

  - Defined in packages/nexus-agents/src/core/logger.ts:40

### error

- error(message: string, error?: Error, context?: LogContext): void

  #### Parameters

  - message: string
  - `Optional` error: Error
  - `Optional` context: LogContext

  #### Returns void

  - Defined in packages/nexus-agents/src/core/logger.ts:41

### child

- child(context: LogContext): ILogger

  #### Parameters

  - context: LogContext

  #### Returns ILogger

  - Defined in packages/nexus-agents/src/core/logger.ts:42

### setLevel

- setLevel(level: LogLevel): void

  #### Parameters

  - level: LogLevel

  #### Returns void

  - Defined in packages/nexus-agents/src/core/logger.ts:43