mirror of
https://github.com/lisk77/comet.git
synced 2025-10-23 21:38:50 +00:00
feat: added the line number from where debug! was called to aid in easier finding of said debug! origin in files
This commit is contained in:
parent
445818b79b
commit
9f66ed3eee
1 changed files with 2 additions and 1 deletions
|
|
@ -16,10 +16,11 @@ macro_rules! info {
|
||||||
macro_rules! debug {
|
macro_rules! debug {
|
||||||
($fmt:expr $(, $args:expr)*) => {
|
($fmt:expr $(, $args:expr)*) => {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"{} [{}::{}] [{}] : {}",
|
"{} [{}::{}:{}] [{}] : {}",
|
||||||
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
|
||||||
std::env::var("CARGO_PKG_NAME").unwrap(),
|
std::env::var("CARGO_PKG_NAME").unwrap(),
|
||||||
module_path!(),
|
module_path!(),
|
||||||
|
line!(),
|
||||||
"\x1b[34m\x1b[1mDEBUG\x1b[0m",
|
"\x1b[34m\x1b[1mDEBUG\x1b[0m",
|
||||||
format!($fmt $(, $args)*)
|
format!($fmt $(, $args)*)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue