Changed formatting for crash!() and log!() file:line formatting

main
Michal 2 years ago
parent a2bafebcfb
commit b165da9112
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -17,14 +17,14 @@ macro_rules! info {
#[macro_export] #[macro_export]
macro_rules! log { macro_rules! log {
($verbose:expr, $($arg:tt)+) => { ($verbose:expr, $($arg:tt)+) => {
$crate::internal::strings::log_fn(&format!("{}:{} {}", file!(), line!(), format!($($arg)+)), $verbose); $crate::internal::strings::log_fn(&format!("[{}:{}] {}", file!(), line!(), format!($($arg)+)), $verbose);
} }
} }
#[macro_export] #[macro_export]
macro_rules! crash { macro_rules! crash {
($exit_code:expr, $($arg:tt)+) => { ($exit_code:expr, $($arg:tt)+) => {
$crate::internal::strings::crash_fn(&format!("{}:{} {}", file!(), line!(), format!($($arg)+)), $exit_code) $crate::internal::strings::crash_fn(&format!("[{}:{}] {}", file!(), line!(), format!($($arg)+)), $exit_code)
} }
} }

Loading…
Cancel
Save