before: 2021-01-26 14:53:36 ERROR -- cifs module is not loaded in after: 2021-01-26 15:00:27 [ERROR] -- cifs module is not loaded in
[why] use square bracket make log more obvious.
Signed-off-by: Liu Yinsi liuyinsi@163.com --- lib/log.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/log.sh b/lib/log.sh index 5acf61825..207795ece 100644 --- a/lib/log.sh +++ b/lib/log.sh @@ -2,25 +2,25 @@
log() { - echo "$(date +'%F %T') INFO -- $*" + echo "$(date +'%F %T') [INFO] -- $*" }
log_info() { - echo "$(date +'%F %T') INFO -- $*" + echo "$(date +'%F %T') [INFO] -- $*" }
log_debug() { - echo "$(date +'%F %T') DEBUG -- $*" + echo "$(date +'%F %T') [DEBUG] -- $*" }
log_warn() { - echo "$(date +'%F %T') WARN -- $*" >&2 + echo "$(date +'%F %T') [WARN] -- $*" >&2 }
log_error() { - echo "$(date +'%F %T') ERROR -- $*" >&2 + echo "$(date +'%F %T') [ERROR] -- $*" >&2 }