aboutsummaryrefslogtreecommitdiff
path: root/lib/_ak_log
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_ak_log')
-rwxr-xr-xlib/_ak_log24
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/_ak_log b/lib/_ak_log
index a3ee259..f6ffc21 100755
--- a/lib/_ak_log
+++ b/lib/_ak_log
@@ -1,4 +1,22 @@
#!/usr/bin/env bash
+###
+### arching-kaos-tools
+### Tools to interact and build an Arching Kaos Infochain
+### Copyright (C) 2021 - 2025 kaotisk
+###
+### This program is free software: you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation, either version 3 of the License, or
+### (at your option) any later version.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program. If not, see <http://www.gnu.org/licenses/>.
+###
_ak_log_print_log_line(){
if [ -n "$1" ]
@@ -78,7 +96,7 @@ _ak_log_message(){
then
echo "$TS" "<$1>" "[ERROR]" "No message" >&2
fi
- exit 1
+ return 1
fi
else
echo "$TS" "<$1>" "[ERROR]" "No type and message" >> $AK_LOGSFILE
@@ -86,7 +104,7 @@ _ak_log_message(){
then
echo "$TS" "<$1>" "[ERROR]" "No type and message" >&2
fi
- exit 1
+ return 1
fi
else
echo "$TS" "<$(basename $0)>" "[ERROR]" "No arguments given" >> $AK_LOGSFILE
@@ -94,7 +112,7 @@ _ak_log_message(){
then
echo "$TS" "<$(basename $0)>" "[ERROR]" "No arguments given" >&2
fi
- exit 1
+ return 1
fi
}