linux: Panic less on window init (#14255)
This change pulls in https://github.com/kvark/blade/pull/135 and updates the simplelog dependency for compatibility with that. Release Notes: - linux: Show link to troubleshooting docs when we can't open a window
This commit is contained in:
parent
ac528dda64
commit
b87d1eabcc
8 changed files with 113 additions and 79 deletions
|
@ -20,7 +20,7 @@ schemars = { workspace = true, features = ["indexmap"] }
|
|||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
serde_json_lenient.workspace = true
|
||||
simplelog = "0.9"
|
||||
simplelog.workspace= true
|
||||
strum = { version = "0.25.0", features = ["derive"] }
|
||||
theme.workspace = true
|
||||
vscode_theme = "0.2.0"
|
||||
|
|
|
@ -12,6 +12,7 @@ use indexmap::IndexMap;
|
|||
use log::LevelFilter;
|
||||
use schemars::schema_for;
|
||||
use serde::Deserialize;
|
||||
use simplelog::ColorChoice;
|
||||
use simplelog::{TermLogger, TerminalMode};
|
||||
use theme::{Appearance, AppearanceContent, ThemeFamilyContent};
|
||||
|
||||
|
@ -94,11 +95,6 @@ fn main() -> Result<()> {
|
|||
|
||||
let log_config = {
|
||||
let mut config = simplelog::ConfigBuilder::new();
|
||||
config
|
||||
.set_level_color(log::Level::Trace, simplelog::Color::Cyan)
|
||||
.set_level_color(log::Level::Info, simplelog::Color::Blue)
|
||||
.set_level_color(log::Level::Warn, simplelog::Color::Yellow)
|
||||
.set_level_color(log::Level::Error, simplelog::Color::Red);
|
||||
|
||||
if !args.warn_on_missing {
|
||||
config.add_filter_ignore_str("theme_printer");
|
||||
|
@ -107,8 +103,13 @@ fn main() -> Result<()> {
|
|||
config.build()
|
||||
};
|
||||
|
||||
TermLogger::init(LevelFilter::Trace, log_config, TerminalMode::Mixed)
|
||||
.expect("could not initialize logger");
|
||||
TermLogger::init(
|
||||
LevelFilter::Trace,
|
||||
log_config,
|
||||
TerminalMode::Mixed,
|
||||
ColorChoice::Auto,
|
||||
)
|
||||
.expect("could not initialize logger");
|
||||
|
||||
if let Some(command) = args.command {
|
||||
match command {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue