1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Use tracing crate for logging (#1192)

* egui_web: use tracing crate
* egui_glow: use tracing crate
* Log at the debug level
* egui_demo_app: enable tracing to log to stdout
* Use tracing in egui-winit
* Add opt-in tracing support to egui
This commit is contained in:
Emil Ernerfeldt
2022-02-01 12:27:39 +01:00
committed by GitHub
parent 1f03f53dc0
commit c6ac1827f6
28 changed files with 194 additions and 107 deletions

View File

@@ -1,5 +1,5 @@
#![allow(unsafe_code)]
use crate::misc_util::glow_print;
use glow::HasContext;
use std::convert::TryInto;
@@ -17,10 +17,11 @@ impl ShaderVersion {
let shading_lang_string =
unsafe { gl.get_parameter_string(glow::SHADING_LANGUAGE_VERSION) };
let shader_version = Self::parse(&shading_lang_string);
glow_print(format!(
tracing::debug!(
"Shader version: {:?} ({:?}).",
shader_version, shading_lang_string
));
shader_version,
shading_lang_string
);
shader_version
}