aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-06-02 04:32:13 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-06-02 04:32:13 +0300
commitb61b49bd34514c9b3b7f5abca054ffb8351c119a (patch)
treef61047c3c0e6dc9580f358362ecbdc76acb49119 /lib
parentff2f210d6662c7231547f04d04b5a9c8fb2cf706 (diff)
downloadarching-kaos-tools-b61b49bd34514c9b3b7f5abca054ffb8351c119a.tar.gz
arching-kaos-tools-b61b49bd34514c9b3b7f5abca054ffb8351c119a.tar.bz2
arching-kaos-tools-b61b49bd34514c9b3b7f5abca054ffb8351c119a.zip
Zero effect, preample to upcoming changes
Diffstat (limited to 'lib')
-rwxr-xr-xlib/_ak_log48
1 files changed, 20 insertions, 28 deletions
diff --git a/lib/_ak_log b/lib/_ak_log
index 242bb27..d2760e6 100755
--- a/lib/_ak_log
+++ b/lib/_ak_log
@@ -1,25 +1,5 @@
#!/bin/bash
-logit(){
- ak-log-message "$PROGRAM" "$1" "$2"
-}
-
-_ak_log_warning(){
- ak-log-message "$PROGRAM" "WARNING" "$1"
-}
-
-_ak_log_debug(){
- ak-log-message "$PROGRAM" "DEBUG" "$1"
-}
-
-_ak_log_error(){
- ak-log-message "$PROGRAM" "ERROR" "$1"
-}
-
-_ak_log_info(){
- ak-log-message "$PROGRAM" "INFO" "$1"
-}
-
_ak_log_follow(){
tail -f $AK_LOGSFILE | while read -r p || [ -n "$p" ]
do
@@ -64,17 +44,9 @@ _ak_log_rotate(){
}
_ak_log_message(){
- PROGRAM="$(basename $0)"
TS="$(date -u +%s)"
if [ ! -z $1 ] && [ -n "$1" ]
then
- if [ "$1" == "-h" ] || [ "$1" == "--help" ]
- then
- echo "$PROGRAM - Log events"
- echo "-h, --help Prints this message"
- echo "<program> <type> <message> Logs this message"
- exit 0
- fi
if [ ! -z "$2" ] && [ -n "$2" ]
then
if [ ! -z "$3" ] && [ -n "$3" ]
@@ -110,3 +82,23 @@ _ak_log_message(){
exit 1
fi
}
+
+logit(){
+ ak-log-message "$PROGRAM" "$1" "$2"
+}
+
+_ak_log_warning(){
+ ak-log-message "$PROGRAM" "WARNING" "$1"
+}
+
+_ak_log_debug(){
+ ak-log-message "$PROGRAM" "DEBUG" "$1"
+}
+
+_ak_log_error(){
+ ak-log-message "$PROGRAM" "ERROR" "$1"
+}
+
+_ak_log_info(){
+ ak-log-message "$PROGRAM" "INFO" "$1"
+}