[icinga-checkins] icinga.org: icinga-core/r1.8: ido2db: be more verbose on debug log when processing bytes
git at icinga.org
git at icinga.org
Mon Oct 8 14:28:26 CEST 2012
Module: icinga-core
Branch: r1.8
Commit: 82b530da7389a24d8542afd26e57800df3c17597
URL: https://git.icinga.org/?p=icinga-core.git;a=commit;h=82b530da7389a24d8542afd26e57800df3c17597
Author: Michael Friedrich <michael.friedrich at gmail.com>
Date: Sat Oct 6 21:49:30 2012 +0200
ido2db: be more verbose on debug log when processing bytes
---
module/idoutils/src/ido2db.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index ea2dbff..02da5e3 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -1357,6 +1357,13 @@ int ido2db_handle_client_connection(int sd) {
}
#endif
+
+ //cpu hogger for debugging only
+ //ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "received 0 bytes from socket. ido2db will try again.\n");
+ //continue;
+
+ ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "received 0 bytes from socket. ido2db will disconnect.\n");
+
/* gracefully back out of current operation... */
ido2db_db_goodbye(&idi);
@@ -1366,6 +1373,7 @@ int ido2db_handle_client_connection(int sd) {
#ifdef DEBUG_IDO2DB2
printf("BYTESREAD: %d\n", result);
#endif
+ ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "BYTESREAD: %d\n", result);
/* append data we just read to dynamic buffer */
buf[result] = '\x0';
@@ -1385,6 +1393,8 @@ int ido2db_handle_client_connection(int sd) {
/* should we disconnect the client? */
if (idi.disconnect_client == IDO_TRUE) {
+ ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "client input data ended, told to disconnect.\n");
+
/* gracefully back out of current operation... */
ido2db_db_goodbye(&idi);
@@ -1395,6 +1405,7 @@ int ido2db_handle_client_connection(int sd) {
#ifdef DEBUG_IDO2DB2
printf("BYTES: %lu, LINES: %lu\n", idi.bytes_processed, idi.lines_processed);
#endif
+ ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "BYTES: %lu, LINES: %lu\n", idi.bytes_processed, idi.lines_processed);
/* terminate threads */
ido2db_terminate_threads();
More information about the icinga-checkins
mailing list