{"record":{"id":"47d3383551ae395c","repo":"biomejs/biome","slug":"failed-to-create-log-file","errorCode":null,"errorMessage":"Failed to create log file","messagePattern":"Failed to create log file","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/biome_cli/src/logging.rs","lineNumber":95,"sourceCode":"    file: Option<&str>,\n    level: LoggingLevel,\n    kind: LoggingKind,\n    colors: Option<&ColorsArg>,\n) {\n    use tracing_subscriber_ext::*;\n\n    if level == LoggingLevel::None {\n        return;\n    }\n\n    let fmt_span = matches!(level, LoggingLevel::Tracing)\n        .then_some(FmtSpan::CLOSE)\n        .unwrap_or(FmtSpan::NONE);\n\n    let make_writer = file\n        .map(File::create)\n        .transpose()\n        .expect(\"Failed to create log file\")\n        .optional()\n        .or_else(std::io::stdout);\n\n    let layer = tracing_subscriber::fmt::layer()\n        .with_level(true)\n        .with_target(false)\n        .with_thread_names(true)\n        .with_file(true)\n        .with_ansi(colors.is_none_or(|c| c.is_enabled()))\n        .with_span_events(fmt_span)\n        .with_writer(make_writer);\n\n    let registry = registry();\n    let filter = LoggingFilter { level };\n    match kind {\n        LoggingKind::Pretty => registry.with(layer.pretty().with_filter(filter)).init(),\n        LoggingKind::Compact => registry.with(layer.compact().with_filter(filter)).init(),\n        LoggingKind::Json => registry","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/biomejs/biome/blob/45a19bbf1747401274f1be1f9f89d6af91367190/crates/biome_cli/src/logging.rs#L77-L113","documentation":"Error \"Failed to create log file\" thrown in biomejs/biome.","triggerScenarios":"Thrown at crates/biome_cli/src/logging.rs:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the parent directory of the log file exists and the process has permission to create files there.","Verify no other process holds an exclusive lock on the log file."],"exampleFix":"std::fs::create_dir_all(path.parent().unwrap())?; let file = std::fs::File::create(path)?;","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"45a19bbf1747401274f1be1f9f89d6af91367190","analyzedAt":"2026-08-20T00:25:09.682Z","contentChangedAt":"2026-08-20T00:25:09.682Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}