summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/mkfile1
-rw-r--r--module/sh9log.m22
2 files changed, 23 insertions, 0 deletions
diff --git a/module/mkfile b/module/mkfile
index 8ca2d3a..76446b5 100644
--- a/module/mkfile
+++ b/module/mkfile
@@ -4,6 +4,7 @@ MODS=\
sh9util.m\
sh9parser.m\
sh9cmd.m\
+ sh9log.m\
<mkmod
diff --git a/module/sh9log.m b/module/sh9log.m
new file mode 100644
index 0000000..4ed5929
--- /dev/null
+++ b/module/sh9log.m
@@ -0,0 +1,22 @@
+Sh9Log: module
+{
+PATH: con "/dis/lib/sh9log.dis";
+DESCR: con "Log functions for sh9";
+
+LOG_DBG, LOG_INF, LOG_WRN, LOG_ERR: con iota;
+
+Logger: adt
+{
+outf: string;
+level: int;
+format: string;
+
+set_level: fn(m: self ref Logger, level: int);
+dbg: fn(m: self ref Logger, s: string): int;
+inf: fn(m: self ref Logger, s: string): int;
+wrn: fn(m: self ref Logger, s: string): int;
+err: fn(m: self ref Logger, s: string): int;
+};
+
+init: fn();
+};