thread-name seems to be unnamed all the time so it's use is currently theoretic

This commit is contained in:
holger krekel
2019-12-16 19:19:06 +01:00
parent 9000342de8
commit cca61a8c12

View File

@@ -8,9 +8,8 @@ macro_rules! info {
($ctx:expr, $msg:expr, $($args:expr),* $(,)?) => {{
let formatted = format!($msg, $($args),*);
let thread = ::std::thread::current();
let full = format!("{thid:?}/{thname} {file}:{line}: {msg}",
let full = format!("{thid:?} {file}:{line}: {msg}",
thid = thread.id(),
thname = thread.name().unwrap_or("unnamed"),
file = file!(),
line = line!(),
msg = &formatted);
@@ -26,9 +25,8 @@ macro_rules! warn {
($ctx:expr, $msg:expr, $($args:expr),* $(,)?) => {{
let formatted = format!($msg, $($args),*);
let thread = ::std::thread::current();
let full = format!("{thid:?}/{thname} {file}:{line}: {msg}",
let full = format!("{thid:?} {file}:{line}: {msg}",
thid = thread.id(),
thname = thread.name().unwrap_or("unnamed"),
file = file!(),
line = line!(),
msg = &formatted);