aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/macros.rs')
-rw-r--r--app/src/macros.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/src/macros.rs b/app/src/macros.rs
new file mode 100644
index 0000000..fe262b4
--- /dev/null
+++ b/app/src/macros.rs
@@ -0,0 +1,31 @@
+#[macro_export]
+macro_rules! logln {
+ ($($arg:tt)*) => {
+ crate::log::write_fmt(format_args!($($arg)*), true);
+ };
+ (_) => {};
+}
+
+#[macro_export]
+macro_rules! log {
+ ($($arg:tt)*) => {
+ crate::log::write_fmt(format_args!($($arg)*), false);
+ };
+ (_) => {};
+}
+
+#[macro_export]
+macro_rules! logln_now {
+ ($($arg:tt)*) => {
+ unsafe {crate::log::write_fmt_now(format_args!($($arg)*), true);}
+ };
+ (_) => {};
+}
+
+#[macro_export]
+macro_rules! log_now {
+ ($($arg:tt)*) => {
+ unsafe {crate::log::write_fmt_now(format_args!($($arg)*), false);}
+ };
+ (_) => {};
+}