mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
include remaining log functions from so-functions
This commit is contained in:
@@ -23,6 +23,21 @@ fi
|
|||||||
INSTALL_LOG=/root/so-analyst-install.log
|
INSTALL_LOG=/root/so-analyst-install.log
|
||||||
exec &> >(tee -a "$INSTALL_LOG")
|
exec &> >(tee -a "$INSTALL_LOG")
|
||||||
|
|
||||||
|
log() {
|
||||||
|
msg=$1
|
||||||
|
level=${2:-I}
|
||||||
|
now=$(TZ=GMT date +"%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
echo -e "$now | $level | $msg" >> "$INSTALL_LOG" 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
error() {
|
||||||
|
log "$1" "E"
|
||||||
|
}
|
||||||
|
|
||||||
|
info() {
|
||||||
|
log "$1" "I"
|
||||||
|
}
|
||||||
|
|
||||||
title() {
|
title() {
|
||||||
echo -e "\n-----------------------------\n $1\n-----------------------------\n" >> "$INSTALL_LOG" 2>&1
|
echo -e "\n-----------------------------\n $1\n-----------------------------\n" >> "$INSTALL_LOG" 2>&1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user