influxdata/influxdb · error · LogError::Fail

Cannot log

Error message

Cannot log: {0}

What it means

LogError::Fail wraps an underlying error (Box<dyn Error + Send + Sync>) from a LogEndpoint implementation, presented to the caller as 'Cannot log: <cause>'. It is the error variant of the processing-engine log trait, meaning the plugin's log sink failed for an implementation-specific reason. The real cause is inside the wrapped error, so read the inner message.

Solutions

  1. Inspect the wrapped inner error (after 'Cannot log: ') to find the actual cause and fix it.
  2. Check that the log sink backing the LogEndpoint (file, socket, service) is available and writable.
  3. Add retry/backoff around log() if the sink is transiently unavailable, or drop logs gracefully when it fails.
Defensive patterns

Strategy: try-catch

Try / catch

match endpoint.log(log).await {
    Ok(()) => {}
    Err(LogError::Fail(e)) => eprintln!("log sink failed: {e}"),
}

Prevention

When it happens

Trigger: Calling log() on a type implementing the LogEndpoint async trait and the implementation returning LogError::Fail(e) for any sink failure (write error, serialization failure, downstream unavailability).

Common situations: Custom processing-engine log handlers writing to a closed file, failed network endpoint, or rejected payload; plugin log pipelines breaking after environment changes.

Related errors


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/1656c72e54b04784. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_py_api/src/logging.rs:136

        Field::new("database_name", DataType::Utf8, true),
        Field::new("error_details", DataType::Utf8, true),
        Field::new("log_level", DataType::Utf8, true),
        Field::new("log_text", DataType::Utf8, true),
        Field::new("node_id", DataType::Utf8, true),
        Field::new("plugin_filename", DataType::Utf8, true),
        Field::new("run_id", DataType::Utf8, true),
        Field::new(
            "time",
            DataType::Timestamp(TimeUnit::Nanosecond, Some("UTC".into())),
            false,
        ),
        Field::new("trigger_name", DataType::Utf8, true),
    ])
}

#[derive(Debug, Error)]
pub enum LogError {
    #[error("Cannot log: {0}")]
    Fail(Box<dyn std::error::Error + Send + Sync>),
}

#[async_trait]
pub trait LogEndpoint: Debug + Send + Sync + 'static {
    async fn log(&self, log: ProcessingEngineLog) -> Result<(), LogError>;
}

#[derive(Debug, Clone)]
pub struct ProcessingEngineLogger {
    database: DatabaseName,
    trigger_name: Arc<str>,
    plugin_filename: Arc<str>,
    run_id: Arc<str>,
    node_id: Arc<str>,
    time_provider: Arc<dyn TimeProvider>,
    sender: mpsc::Sender<ProcessingEngineLog>,
    dropped_logs: Arc<AtomicU64>,

View on GitHub (pinned to 06200ef96b)