summaryrefslogtreecommitdiff
path: root/tnslc/logging.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-03-25 22:39:06 -0400
committerKyle Gunger <kgunger12@gmail.com>2024-03-25 22:39:06 -0400
commitf3a773c750181f8f3d52fd672587814275a04bd7 (patch)
tree8c37ae892960f0988aa6006661beef4ff8b8e8e5 /tnslc/logging.tnsl
parent0bc05b40d541483d16445b98ea0841d1912a8198 (diff)
Remove old parser files
Diffstat (limited to 'tnslc/logging.tnsl')
-rw-r--r--tnslc/logging.tnsl75
1 files changed, 0 insertions, 75 deletions
diff --git a/tnslc/logging.tnsl b/tnslc/logging.tnsl
deleted file mode 100644
index 2de326a..0000000
--- a/tnslc/logging.tnsl
+++ /dev/null
@@ -1,75 +0,0 @@
-##
-## LOG UTILITIES
-##
-
-# Log levels:
-# 0 - Visual queues and errors only
-# 1 - Info (default)
-# 2 - Debugging information (useful for me, probably less for you)
-# 3 - Also logs the state changes of the log itself
-int log_level = 2
-int log_mode = 1
-
-{}uint8 _log_print_one = "\0\0"
-{}uint8 _log_nl = "\n\0"
-{}uint8 _log_prefix = "[TNSLC] [%d] \0"
-
-/; log_state(int new_state)
- /; if (new_state !== log_mode)
- _printf(~_log_nl{0})
- ;/
-
- log_mode = new_state
-;/
-
-/; log_err (~uint8 msg)
- log_state(0)
- _print_num(~_log_prefix{0}, log_mode)
- _printf(msg)
- _printf(~_log_nl{0})
-;/
-
-/; log_info (~uint8 msg)
- /; if (log_level > 0)
- log_state(1)
- _print_num(~_log_prefix{0}, log_mode)
- _printf(msg)
- _printf(~_log_nl{0})
- ;/
-;/
-
-/; log_vis (~uint8 msg)
- log_state(0)
- _printf(msg)
-;/
-
-/; log_debug (~uint8 msg)
- /; if (log_level > 1)
- log_state(2)
- _print_num(~_log_prefix{0}, log_mode)
- _printf(msg)
- _printf(~_log_nl{0})
- ;/
-;/
-
-# bypass logging framework (mostly for in-place debugging)
-
-/; log_one (uint8 c)
- _log_print_one{0} = c
- _printf(~_log_print_one{0})
-;/
-
-/; log_one_nl (uint8 c)
- log_one(c)
- _printf(~_log_nl{0})
-;/
-
-/; log_num (int i)
- _print_num(~_dec{0}, i)
-;/
-
-/; log_num_nl (int i)
- _print_num(~_dec{0}, i)
- _printf(~_log_nl{0})
-;/
-