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

# Logging and Monitoring

The *Logging and Monitoring* functions help you monitor and debug a conversation. They let you log messages and track token usage.

## [`log`](/ai/for-developers/function-reference/logging/log)

**Syntax:** `log(level, message)`

Writes a log entry to the execution logs.

## [`getLLMTokenUsageForSession`](/ai/for-developers/function-reference/logging/getLLMTokenUsageForSession)

**Syntax:** `getLLMTokenUsageForSession()`

Retrieves the token usage information for the conversation session. Returns `null` if no token usage information is available.

## [`setSensitiveLoggingSettings`](/ai/for-developers/function-reference/logging/setSensitiveLoggingSettings)

**Syntax:** `setSensitiveLoggingSettings(settings)`

Adjusts the masking and redaction configuration for the conversation.
