Deployment and upgradesOfficial documentation6 min readDeployment and upgrades

Configure FastGPT Logging and OTEL Collection

Log Configuration Overview FastGPT supports flexible logging setup with both console output and OpenTelemetry (OTEL) based log collection.

Log Configuration Overview

FastGPT supports flexible logging setup with both console output and OpenTelemetry (OTEL) based log collection. Valid log levels follow a standard severity hierarchy, including trace, debug, info, warning, error, and fatal. Each logging destination has independent minimum log level thresholds, allowing administrators to control the verbosity of logs sent to each output.

Configurable Environment Variables

All logging settings are adjusted via environment variables, which can be set in your FastGPT deployment’s .env file or orchestrated environment configuration. The full list of available variables is below:

Environment VariableDescriptionValid/Example Value
LOG_ENABLE_CONSOLEToggles real-time console log outputtrue to enable, false to disable
LOG_CONSOLE_LEVELDefines the minimum severity level for console logsOne of trace, debug, info, warning, error, fatal
LOG_ENABLE_OTELToggles OTLP-compliant log collectiontrue to enable, false to disable
LOG_OTEL_LEVELDefines the minimum severity level for OTEL-collected logsOne of trace, debug, info, warning, error, fatal
LOG_OTEL_SERVICE_NAMELabels the FastGPT service for the OTLP collectorDefault example value: fastgpt-client
LOG_OTEL_URLFull endpoint URL for the OTLP log collectorMust include the /v1/logs path; default example: http://localhost:4318/v1/logs

Deploy Updated Configuration

After updating your environment variables, apply the changes by restarting the FastGPT service. For file-based deployments, restart the background service running FastGPT. For containerized deployments, restart the FastGPT container instances to load the new configuration.

Source: FastGPT official source

Applicability and version scope

Use this page for the documented Deployment and upgrades scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.

Safety guardrails

Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.

Rollback guidance

Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.