mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-12-19 14:38:44 +00:00
logger: add function name in the logs
This commit is contained in:
parent
18458e3465
commit
d3005335b8
1 changed files with 4 additions and 4 deletions
|
@ -63,7 +63,7 @@ impl fmt::Display for LogLevel {
|
||||||
macro_rules! GPS_ERROR (
|
macro_rules! GPS_ERROR (
|
||||||
() => ($crate::print!("\n"));
|
() => ($crate::print!("\n"));
|
||||||
($($arg:tt)*) => ({
|
($($arg:tt)*) => ({
|
||||||
logger::print_log(logger::LogLevel::Error, format_args!($($arg)*).to_string());
|
logger::print_log(logger::LogLevel::Error, format!("{}\t{}",glib::function_name!(),format_args!($($arg)*).to_string()));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ macro_rules! GPS_ERROR (
|
||||||
macro_rules! GPS_WARN (
|
macro_rules! GPS_WARN (
|
||||||
() => ($crate::print!("\n"));
|
() => ($crate::print!("\n"));
|
||||||
($($arg:tt)*) => ({
|
($($arg:tt)*) => ({
|
||||||
logger::print_log(logger::LogLevel::Warning, format_args!($($arg)*).to_string());
|
logger::print_log(logger::LogLevel::Warning, format!("{}\t{}",glib::function_name!(),format_args!($($arg)*).to_string()));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ macro_rules! GPS_WARN (
|
||||||
macro_rules! GPS_INFO (
|
macro_rules! GPS_INFO (
|
||||||
() => ($crate::print!("\n"));
|
() => ($crate::print!("\n"));
|
||||||
($($arg:tt)*) => ({
|
($($arg:tt)*) => ({
|
||||||
logger::print_log(logger::LogLevel::Info, format_args!($($arg)*).to_string());
|
logger::print_log(logger::LogLevel::Info, format!("{}\t{}",glib::function_name!(),format_args!($($arg)*).to_string()));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ macro_rules! GPS_INFO (
|
||||||
macro_rules! GPS_DEBUG (
|
macro_rules! GPS_DEBUG (
|
||||||
() => ($crate::print!("\n"));
|
() => ($crate::print!("\n"));
|
||||||
($($arg:tt)*) => ({
|
($($arg:tt)*) => ({
|
||||||
logger::print_log(logger::LogLevel::Debug, format_args!($($arg)*).to_string());
|
logger::print_log(logger::LogLevel::Debug, format!("{}\t{}",glib::function_name!(),format_args!($($arg)*).to_string()));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue