{"record":{"id":"1656c72e54b04784","repo":"influxdata/influxdb","slug":"cannot-log-0","errorCode":null,"errorMessage":"Cannot log: {0}","messagePattern":"Cannot log: (.+?)","errorType":"error_code","errorClass":"LogError::Fail","httpStatus":null,"severity":"error","filePath":"influxdb3_py_api/src/logging.rs","lineNumber":136,"sourceCode":"        Field::new(\"database_name\", DataType::Utf8, true),\n        Field::new(\"error_details\", DataType::Utf8, true),\n        Field::new(\"log_level\", DataType::Utf8, true),\n        Field::new(\"log_text\", DataType::Utf8, true),\n        Field::new(\"node_id\", DataType::Utf8, true),\n        Field::new(\"plugin_filename\", DataType::Utf8, true),\n        Field::new(\"run_id\", DataType::Utf8, true),\n        Field::new(\n            \"time\",\n            DataType::Timestamp(TimeUnit::Nanosecond, Some(\"UTC\".into())),\n            false,\n        ),\n        Field::new(\"trigger_name\", DataType::Utf8, true),\n    ])\n}\n\n#[derive(Debug, Error)]\npub enum LogError {\n    #[error(\"Cannot log: {0}\")]\n    Fail(Box<dyn std::error::Error + Send + Sync>),\n}\n\n#[async_trait]\npub trait LogEndpoint: Debug + Send + Sync + 'static {\n    async fn log(&self, log: ProcessingEngineLog) -> Result<(), LogError>;\n}\n\n#[derive(Debug, Clone)]\npub struct ProcessingEngineLogger {\n    database: DatabaseName,\n    trigger_name: Arc<str>,\n    plugin_filename: Arc<str>,\n    run_id: Arc<str>,\n    node_id: Arc<str>,\n    time_provider: Arc<dyn TimeProvider>,\n    sender: mpsc::Sender<ProcessingEngineLog>,\n    dropped_logs: Arc<AtomicU64>,","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_py_api/src/logging.rs#L118-L154","documentation":"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.","triggerScenarios":"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).","commonSituations":"Custom processing-engine log handlers writing to a closed file, failed network endpoint, or rejected payload; plugin log pipelines breaking after environment changes.","solutions":["Inspect the wrapped inner error (after 'Cannot log: ') to find the actual cause and fix it.","Check that the log sink backing the LogEndpoint (file, socket, service) is available and writable.","Add retry/backoff around log() if the sink is transiently unavailable, or drop logs gracefully when it fails."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match endpoint.log(log).await {\n    Ok(()) => {}\n    Err(LogError::Fail(e)) => eprintln!(\"log sink failed: {e}\"),\n}","preventionTips":["Keep the log sink (file/socket/service) healthy and monitored.","Unwrap the boxed inner error to diagnose the true cause.","Decide an explicit policy for log failures (retry, drop, or abort)."],"tags":["rust","logging","processing-engine"],"backgroundTag":"api-error-response","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}