> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Logging

> Public logging signatures and configuration in @agentium/core 4.0.0.

Import these **3 exports** from `@agentium/core`. Read the [logging guide](/agents/logging) for setup and behavior, or return to the [package reference](/api-reference/core).

A `?` marks an optional field. These are declarations for lookup; run the examples in the linked guide. Follow related-type links for Agentium types and source links for imported dependency types.

## Logger

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/logger/logger.ts)

```typescript theme={null}
export declare class Logger {
    constructor(config?: LoggerConfig);
    /** Compact JSON when it fits one line; otherwise pretty-print. Never slice mid-token. */
    formatPayload(value: unknown, maxChars?: number): string;
    debug(msg: string, data?: Record<string, unknown>): void;
    info(msg: string, data?: Record<string, unknown>): void;
    warn(msg: string, data?: Record<string, unknown>): void;
    error(msg: string, data?: Record<string, unknown>): void;
    agentStart(agentName: string, input: string): void;
    toolCall(toolName: string, args?: Record<string, unknown>): void;
    toolResult(toolName: string, result: string): void;
    thinking(content: string): void;
    agentEnd(_agentName: string, output: string, usage: {
        promptTokens: number;
        completionTokens: number;
        totalTokens: number;
        reasoningTokens?: number;
    }, durationMs: number): void;
    separator(): void;
}
```

Related: [`LoggerConfig`](/api-reference/core/logger#loggerconfig).

## LoggerConfig

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/logger/logger.ts)

```typescript theme={null}
export interface LoggerConfig {
    level?: LogLevel;
    color?: boolean;
    prefix?: string;
    /**
     * Max characters of a tool arg/result body printed at debug.
     * Default: 100_000 (full JSON in practice). Set lower if a toolkit dumps megabytes.
     */
    maxPayloadChars?: number;
}
```

Related: [`LogLevel`](/api-reference/core/logger#loglevel).

## LogLevel

[Source](https://github.com/agentiumOS/agentium/blob/v4.0.0/packages/core/src/logger/logger.ts)

```typescript theme={null}
export type LogLevel = "debug" | "info" | "warn" | "error" | "silent";
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.