diff --git a/src/log.rs b/src/log.rs
@@ -50,14 +50,6 @@ pub(crate) fn log(level: Level, args: &Arguments<'_>, newline: bool) {
#[macro_export]
macro_rules! info {
- // info!(key1:? = 42, key2 = true; "a {} event", "log");
- ($($key:tt $(:$capture:tt)? $(= $value:expr)?),+; $($arg:tt)+) => ({
- $crate::log::log(
- $crate::log::Level::Info,
- &std::format_args!($($arg)+),
- false,
- );
- });
// info!("a {} event", "log");
($($arg:tt)+) => ({
$crate::log::log(
@@ -70,14 +62,6 @@ macro_rules! info {
#[macro_export]
macro_rules! infoln {
- // infoln!(key1:? = 42, key2 = true; "a {} event", "log");
- ($($key:tt $(:$capture:tt)? $(= $value:expr)?),+; $($arg:tt)+) => ({
- $crate::log::log(
- $crate::log::Level::Info,
- &std::format_args!($($arg)+),
- true,
- );
- });
// infoln!("a {} event", "log");
($($arg:tt)+) => ({
$crate::log::log(
@@ -90,21 +74,22 @@ macro_rules! infoln {
#[macro_export]
macro_rules! info_done {
- () => {
+ () => ({
let _ = writeln!(io::stdout().lock(), " Done!");
- };
+ });
+
+ // infoln!("a {} event", "log");
+ ($($arg:tt)+) => ({
+ let _ = writeln!(
+ io::stdout().lock(),
+ " {}",
+ &std::format_args!($($arg)+)
+ );
+ });
}
#[macro_export]
macro_rules! error {
- // error!(key1:? = 42, key2 = true; "a {} event", "log");
- ($($key:tt $(:$capture:tt)? $(= $value:expr)?),+; $($arg:tt)+) => ({
- $crate::log::log(
- $crate::log::Level::Error,
- &std::format_args!($($arg)+),
- false,
- );
- });
// info!("a {} event", "log");
($($arg:tt)+) => ({
$crate::log::log(
@@ -117,14 +102,6 @@ macro_rules! error {
#[macro_export]
macro_rules! errorln {
- // errorln!(key1:? = 42, key2 = true; "a {} event", "log");
- ($($key:tt $(:$capture:tt)? $(= $value:expr)?),+; $($arg:tt)+) => ({
- $crate::log::log(
- $crate::log::Level::Error,
- &std::format_args!($($arg)+),
- true,
- );
- });
// errorln!("a {} event", "log");
($($arg:tt)+) => ({
$crate::log::log(
@@ -137,14 +114,6 @@ macro_rules! errorln {
#[macro_export]
macro_rules! warnln {
- // info!(key1:? = 42, key2 = true; "a {} event", "log");
- ($($key:tt $(:$capture:tt)? $(= $value:expr)?),+; $($arg:tt)+) => ({
- $crate::log::log(
- $crate::log::Level::Warn,
- &std::format_args!($($arg)+),
- true,
- );
- });
// info!("a {} event", "log");
($($arg:tt)+) => ({
$crate::log::log(