X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=src%2Fawk%2Flib%2Fmsg_out.awk;fp=src%2Fawk%2Flib%2Fmsg_out.awk;h=0000000000000000000000000000000000000000;hb=81336934f5dcb1895c050d71805ec37e56c400ad;hp=24393c664b1075a1eca7fa0141e4e819e2bf32fe;hpb=0f81c6a873640359583d44a791e706de2d44ea1e;p=khatus.git diff --git a/src/awk/lib/msg_out.awk b/src/awk/lib/msg_out.awk deleted file mode 100644 index 24393c6..0000000 --- a/src/awk/lib/msg_out.awk +++ /dev/null @@ -1,58 +0,0 @@ -BEGIN { - FS1 = "|" # Fiels separator, level 1 (record to fields) - FS2 = ":" # Fiels separator, level 2 (field to subfields - - OFS = FS1 - Kfs = FS2 -} - -# ----------------------------------------------------------------------------- -# alert -# ----------------------------------------------------------------------------- -function msg_out_alert_low(subject, body) { - msg_out_alert("low", subject, body) -} - -function msg_out_alert_med(subject, body) { - msg_out_alert("med", subject, body) -} - -function msg_out_alert_hi(subject, body) { - msg_out_alert("hi", subject, body) -} - -function msg_out_alert(priority, subject, body) { - # priority : "low" | "med" | "hi" - # subject : string without spaces - # body : anything - print(Node, Module, "alert", priority, subject, body) -} - -# ----------------------------------------------------------------------------- -# log -# ----------------------------------------------------------------------------- -function msg_out_log_info(location, msg) { - msg_out_log("info", location, msg) -} - -function msg_out_log_error(location, msg) { - msg_out_log("error", location, msg) -} - -function msg_out_log(level, location, msg) { - print(Node, Module, "log", location, level, msg) > "/dev/stderr" -} - -# ----------------------------------------------------------------------------- -# status_bar -# ----------------------------------------------------------------------------- -function msg_out_status_bar(bar) { - print(Node, Module, "status_bar", bar) -} - -# ----------------------------------------------------------------------------- -# data -# ----------------------------------------------------------------------------- -function msg_out_data(key, val) { - print(Node, Module, "data", key, val) -}