{"record":{"id":"24fb0fb2d697c43d","repo":"zellij-org/zellij","slug":"exceeded-log-buffer-size-make-sure-that-your-plug","errorCode":null,"errorMessage":"Exceeded log buffer size. Make sure that your plugin calls flush on stderr on valid UTF-8 symbol boundary. Additionally, make sure that your log message contains endline \\n symbol.","messagePattern":"Exceeded log buffer size\\. Make sure that your plugin calls flush on stderr on valid UTF-8 symbol boundary\\. Additionally, make sure that your log message contains endline \\\\n symbol\\.","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"zellij-server/src/logging_pipe.rs","lineNumber":47,"sourceCode":"            \"|{:<25.25}| {} [{:<10.15}] {}\",\n            self.plugin_name,\n            chrono::Local::now().format(\"%Y-%m-%d %H:%M:%S.%3f\"),\n            format!(\"id: {}\", self.plugin_id),\n            message\n        );\n    }\n}\n\nimpl Write for LoggingPipe {\n    fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {\n        if self.buffer.len() + buf.len() > ZELLIJ_MAX_PIPE_BUFFER_SIZE {\n            let error_msg =\n                \"Exceeded log buffer size. Make sure that your plugin calls flush on stderr on \\\n                valid UTF-8 symbol boundary. Additionally, make sure that your log message contains \\\n                endline \\\\n symbol.\";\n            error!(\"{}: {}\", self.plugin_name, error_msg);\n            self.buffer.clear();\n            return Err(std::io::Error::new(\n                std::io::ErrorKind::InvalidData,\n                error_msg,\n            ));\n        }\n\n        self.buffer.extend(buf);\n        self.flush()?;\n\n        Ok(buf.len())\n    }\n\n    // When we flush, check if current buffer is valid utf8 string, split by '\\n' and truncate buffer in the process.\n    // We assume that eventually, flush will be called on valid string boundary (i.e. std::str::from_utf8(..).is_ok() returns true at some point).\n    // Above assumption might not be true, in which case we'll have to think about it. Make it simple for now.\n    fn flush(&mut self) -> std::io::Result<()> {\n        self.buffer.make_contiguous();\n\n        match std::str::from_utf8(self.buffer.as_slices().0) {","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/zellij-org/zellij/blob/5cb5df5cce4e16c5d1c57c7c062e4a90a7823c41/zellij-server/src/logging_pipe.rs#L29-L65","documentation":"Error \"Exceeded log buffer size. Make sure that your plugin calls flush on stderr on valid UTF-8 symbol boundary. Additionally, make sure that your log message contains endline \\n symbol.\" thrown in zellij-org/zellij.","triggerScenarios":"Occurs at zellij-server/src/logging_pipe.rs:47 when the operation fails: \"Exceeded log buffer size. Make sure that your plugin calls flush on stderr on valid UTF-8 symbol boundary. Additionally,\". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.","commonSituations":"Plugin logging very long lines or flushing mid-UTF-8-character.","solutions":["Call flush on stderr at valid UTF-8 boundaries in the plugin.","Include a newline in plugin log messages and keep individual messages smaller."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5cb5df5cce4e16c5d1c57c7c062e4a90a7823c41","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}