biomejs/biome · error
Failed to start the logger for the daemon.
Error message
Failed to start the logger for the daemon.
What it means
Error "Failed to start the logger for the daemon." thrown in biomejs/biome.
Source
Thrown at crates/biome_cli/src/commands/daemon.rs:220
/// Set up the [tracing]-based logging system for the server
/// The events received by the subscriber are filtered at the `info` level,
/// then printed using the [HierarchicalLayer] layer, and the resulting text
/// is written to log files rotated on a hourly basis (in
/// `biome-logs/server.log.yyyy-MM-dd-HH` files inside the system temporary
/// directory)
fn setup_daemon_subscriber(
log_path: Utf8PathBuf,
log_file_name_prefix: String,
level: LoggingLevel,
) {
let appender_builder = tracing_appender::rolling::RollingFileAppender::builder();
let file_appender = appender_builder
.filename_prefix(log_file_name_prefix)
.max_log_files(7)
.rotation(Rotation::HOURLY)
.build(log_path)
.expect("Failed to start the logger for the daemon.");
registry()
.with(
HierarchicalLayer::default()
.with_indent_lines(true)
.with_indent_amount(2)
.with_bracketed_fields(true)
.with_targets(true)
.with_ansi(false)
.with_writer(file_appender)
.with_filter(LoggingFilter { level }),
)
.init();
}
pub fn default_biome_log_path() -> Utf8PathBuf {
match env::var_os("BIOME_LOG_PATH") {
Some(directory) => Utf8PathBuf::from(directory.as_os_str().to_str().unwrap()),View on GitHub (pinned to 45a19bbf17)
Solutions
- Check that the log directory exists and is writable before starting the daemon.
- Inspect the underlying IO error attached to this error for the root cause.
Example fix
std::fs::create_dir_all(log_dir)?; // before initializing the daemon logger
When it happens
Trigger: Thrown at crates/biome_cli/src/commands/daemon.rs:221 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of biomejs/biome@45a19bbf17 (2026-08-20).
Data as JSON: /api/errors/8a921a7e6c09e5a3.
Report an issue: GitHub.