[stgt] [PATCH 3/3] few logger fixes
Alexander Nezhinsky
alexandern at Voltaire.COM
Thu Jun 3 15:23:28 CEST 2010
fixed log message about logger start (printed the wrong pid) and
added some new relevant message
Signed-off-by: Alexander Nezhinsky <alexandern at voltaire.com>
---
usr/log.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/usr/log.c b/usr/log.c
index be9b0c2..6abbd83 100644
--- a/usr/log.c
+++ b/usr/log.c
@@ -368,7 +368,9 @@ int log_init(char *program_name, int size, int daemon, int debug)
return 1;
} else if (pid) {
syslog(LOG_WARNING,
- "Target daemon logger with pid=%d started!\n", pid);
+ "tgtd daemon started, pid:%d\n", getpid());
+ syslog(LOG_WARNING,
+ "tgtd logger started, pid:%d debug:%d\n", pid, is_debug);
return 0;
}
@@ -397,6 +399,8 @@ void log_close(void)
la->active = 0;
waitpid(pid, NULL, 0);
+ log_warning("tgtd logger stopped, pid:%d\n", pid);
+ log_flush();
closelog();
free_logarea();
}
--
1.6.5
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list