logiguard fork v3: full patch set on verified 8c74db0 tree
Includes prior-session patches (carry forward so the app compiles): - crates/gpui/build.rs: cross-compile manifest fix - crates/gpui/src/platform.rs: PlatformWindow::activate_with_token trait method - crates/gpui/src/window.rs: Window::activate_with_token public API - crates/gpui_linux/src/linux/wayland/window.rs: WaylandWindow::activate_with_token + activate() keyboard-serial fix Plus the focus-serial fix: - serial.rs: SerialKind::KeyboardEnter - client.rs: store wl_keyboard.enter serial; latest_serial_of() Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
21
crates/zlog_settings/Cargo.toml
Normal file
21
crates/zlog_settings/Cargo.toml
Normal file
@@ -0,0 +1,21 @@
|
||||
[package]
|
||||
name = "zlog_settings"
|
||||
version = "0.1.0"
|
||||
edition.workspace = true
|
||||
publish.workspace = true
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[lib]
|
||||
path = "src/zlog_settings.rs"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
[dependencies]
|
||||
gpui.workspace = true
|
||||
collections.workspace = true
|
||||
settings.workspace = true
|
||||
zlog.workspace = true
|
||||
1
crates/zlog_settings/LICENSE-GPL
Symbolic link
1
crates/zlog_settings/LICENSE-GPL
Symbolic link
@@ -0,0 +1 @@
|
||||
../../LICENSE-GPL
|
||||
30
crates/zlog_settings/src/zlog_settings.rs
Normal file
30
crates/zlog_settings/src/zlog_settings.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
//! # zlog_settings
|
||||
use collections::HashMap;
|
||||
|
||||
use gpui::App;
|
||||
use settings::{RegisterSetting, Settings, SettingsStore};
|
||||
|
||||
pub fn init(cx: &mut App) {
|
||||
cx.observe_global::<SettingsStore>(|cx| {
|
||||
let zlog_settings = ZlogSettings::get_global(cx);
|
||||
zlog::filter::refresh_from_settings(&zlog_settings.scopes);
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, RegisterSetting)]
|
||||
pub struct ZlogSettings {
|
||||
/// A map of log scopes to the desired log level.
|
||||
/// Useful for filtering out noisy logs or enabling more verbose logging.
|
||||
///
|
||||
/// Example: {"log": {"client": "warn"}}
|
||||
pub scopes: HashMap<String, String>,
|
||||
}
|
||||
|
||||
impl Settings for ZlogSettings {
|
||||
fn from_settings(content: &settings::SettingsContent) -> Self {
|
||||
ZlogSettings {
|
||||
scopes: content.log.clone().unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user