feat(logging): first very simple logging implementation
Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
@@ -13,6 +13,7 @@ set -e
|
||||
|
||||
### base variables
|
||||
SYSTEMD="/etc/systemd/system"
|
||||
LOGFILE="/tmp/kiauh.log"
|
||||
|
||||
# setting up some frequently used functions
|
||||
check_euid(){
|
||||
@@ -27,6 +28,15 @@ check_euid(){
|
||||
fi
|
||||
}
|
||||
|
||||
function timestamp() {
|
||||
date +"[%F %T]"
|
||||
}
|
||||
|
||||
function log() {
|
||||
local message="${1}"
|
||||
echo -e "$(timestamp) ${message}" | tr -s " " >> "${LOGFILE}"
|
||||
}
|
||||
|
||||
check_klipper_cfg_path(){
|
||||
source_kiauh_ini
|
||||
if [ -z "${klipper_cfg_loc}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user