Parcourir la source

fix(monitor): improve logging messages

- Refactored the `fn_monitor_check_lockfile`, `fn_monitor_check_backup`, and `fn_monitor_check_install` functions in the `command_monitor.sh` file.
- Updated the logging messages to provide more concise and informative output.
- Replaced `fn_print_info_nl` with `fn_print_info` for consistency.
- Removed unnecessary line breaks in the logging messages.
Daniel Gibbs il y a 2 ans
Parent
commit
c13a7d003f
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      lgsm/modules/command_monitor.sh

+ 3 - 3
lgsm/modules/command_monitor.sh

@@ -38,7 +38,7 @@ fn_monitor_check_lockfile() {
 fn_monitor_check_backup() {
 	# Monitor will check if backup is running.
 	if [ "$(pgrep "${selfname} backup" | wc -l)" != "0" ] || [ "$(pgrep "${selfname} b" | wc -l)" != "0" ]; then
-		fn_print_info_nl "Checking lockfile: LinuxGSM is currently running a backup: "
+		fn_print_info "Checking lockfile: LinuxGSM is currently running a backup: "
 		fn_print_info_eol
 		fn_script_log_info "Checking lockfile: LinuxGSM is currently running a backup"
 		core_exit.sh
@@ -48,7 +48,7 @@ fn_monitor_check_backup() {
 fn_monitor_check_debug() {
 	# Monitor will check if backup is running.
 	if [ "$(pgrep -fc "${selfname} backup")" != "0" ] || [ "$(pgrep -fc "${selfname} b")" != "0" ]; then
-		fn_print_info_nl "Checking lockfile: LinuxGSM is currently in debug mode: "
+		fn_print_info "Checking lockfile: LinuxGSM is currently in debug mode: "
 		fn_print_info_eol
 		fn_script_log_pass "Checking lockfile: LinuxGSM is currently in debug mode"
 		core_exit.sh
@@ -61,7 +61,7 @@ fn_monitor_check_install() {
 		fn_print_dots "Checking for installer: "
 		fn_print_checking_eol
 		fn_script_log_info "Checking for installer: CHECKING"
-		fn_print_info_nl "Checking for installer: LinuxGSM is currently installing: "
+		fn_print_info "Checking for installer: LinuxGSM is currently installing: "
 		fn_print_info_eol
 		fn_script_log_pass "Checking for installer: LinuxGSM is currently installing"
 		core_exit.sh