From: Florian G. <re...@us...> - 2007-12-18 00:03:12
|
Update of /cvsroot/perfparse/_perfparse/libpp_common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26547/libpp_common Modified Files: config_file.c log.c Log Message: squashed some compiler warnings Index: log.c =================================================================== RCS file: /cvsroot/perfparse/_perfparse/libpp_common/log.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** log.c 16 Dec 2007 22:45:52 -0000 1.5 --- log.c 18 Dec 2007 00:03:00 -0000 1.6 *************** *** 71,75 **** if((log_level&config_get_value_as_integer(CONFIG_ITEM_ID_ERROR_LOG_LEVEL))==0) { ! return; } --- 71,75 ---- if((log_level&config_get_value_as_integer(CONFIG_ITEM_ID_ERROR_LOG_LEVEL))==0) { ! return(FALSE); } Index: config_file.c =================================================================== RCS file: /cvsroot/perfparse/_perfparse/libpp_common/config_file.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** config_file.c 17 Dec 2007 20:49:53 -0000 1.7 --- config_file.c 18 Dec 2007 00:03:00 -0000 1.8 *************** *** 28,31 **** --- 28,35 ---- *****************************************************************************/ + #if HAVE_CONFIG_H + # include <config.h> + #endif /* HAVE_CONFIG_H */ + #include <gettext.h> #include <config.h> *************** *** 54,58 **** char *my_gethostname(void) { - pp_log_func; char *s=NULL; #if defined (OS_SOLARIS) --- 58,61 ---- *************** *** 110,124 **** config_item_add(config_definition, CONFIG_ITEM_ID_CONFIG_FILE, "Config_File", "/" SYSCONFDIR "/" CONFIG_FILE , _("Config file"), _("File for Perfparse configuration"), "-c", "--config-file", TYPE_STRING, 0); ! config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG, "Error_Log", default_error_log, _("Perfparse log"), _("File where Perfparse logs messages"), "-e", "--error-log", TYPE_STRING, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG_LEVEL, "Error_Log_Level", "15", _("Perfparse log level"), _("Error log level"), "-x", "--error-log-level", TYPE_INT, 1); config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG_ROTATE, "Error_Log_Rotate", "yes", _("Perfparse log rotate"), _("Rotate Perfparse log files"), NULL, NULL,TYPE_BOOLEAN, 1); config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG_KEEP_N_DAYS, "Error_Log_Keep_N_Days", "7", _("Keep N days of error log"), _("Keep N days of error log. Compress recent logs and remove too old ones"), NULL, NULL,TYPE_INT, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_DROP_FILE, "Drop_File", "/tmp/perfparse.drop", _("File for dropped lines"), _("When perfparse cannot parse a line, it drops it to that file"), NULL, "--drop-file", TYPE_STRING, 1); config_item_add(config_definition, CONFIG_ITEM_ID_DROP_FILE_ROTATE, "Drop_File_Rotate", "no", "", "", NULL, NULL,TYPE_BOOLEAN, 1); config_item_add(config_definition, CONFIG_ITEM_ID_DROP_FILE_KEEP_N_DAYS, "Drop_File_Keep_N_Days", "7", _("Keep N days of drop file log"), _("Keep N days of drop file log. Compress recent logs and remove too old ones"), NULL, NULL,TYPE_INT, 1); config_item_add(config_definition, CONFIG_ITEM_ID_SERVER_PORT, "Server_Port", "1976", _("Server port"), _("Port for perfparsed server\n# Put 0 or \"\" to disable the server"), "-p", "--port", TYPE_INT, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_SERVICE_LOG, "Service_Log", "/usr/local/nagios/var/serviceperf.log", _("Input log source (from nagios or perfparsed)"), _("Log source from nagios (or other tools) that perfparse will scan\n# Authorized values: a file name, '-' for stdin, '|' for a fifo and '>' for a host:port socket\n# For sockets, a command 'history' will be sent before retreiving the data"), "-l", "--serviceperf-log", TYPE_STRING, 1); config_item_add(config_definition, CONFIG_ITEM_ID_SERVICE_LOG_SAVE_POSITION, "Service_Log_Save_Position", "yes", _("Save the read position"), _("Save the read position in the nagios log file ? If yes, perfparse will start from that position instead of from the beginning"), NULL, NULL, TYPE_BOOLEAN, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_SERVICE_LOG_POSITION_MARK_PATH, "Service_Log_Position_Mark_Path", "" , _("Position mark file path"), _("Path for files containing the read position for nagios log files"), NULL, NULL, TYPE_STRING, 1); config_item_add(config_definition, CONFIG_ITEM_ID_HISTORY_START_TM, "History_Start_Tm", "-86400", _("Start timestamp for history retreiving"), _("Start timestamp for history retreiving (positive is absolute, negative is relative to end tm)"), NULL, "--history_start_tm", TYPE_INT, 1); config_item_add(config_definition, CONFIG_ITEM_ID_HISTORY_END_TM, "History_End_Tm", "-30", _("End timestamp for history retreiving"), _("End timestamp for history retreiving (positive is absolute, negative is relative to Now)"), NULL, "--history_end_tm", TYPE_INT, 1); --- 113,127 ---- config_item_add(config_definition, CONFIG_ITEM_ID_CONFIG_FILE, "Config_File", "/" SYSCONFDIR "/" CONFIG_FILE , _("Config file"), _("File for Perfparse configuration"), "-c", "--config-file", TYPE_STRING, 0); ! config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG, "Error_Log", "/" LOCALSTATEDIR "/perfparse.log" , _("Perfparse log"), _("File where Perfparse logs messages"), "-e", "--error-log", TYPE_STRING, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG_LEVEL, "Error_Log_Level", "15", _("Perfparse log level"), _("Error log level"), NULL, "--error-log-level", TYPE_INT, 1); config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG_ROTATE, "Error_Log_Rotate", "yes", _("Perfparse log rotate"), _("Rotate Perfparse log files"), NULL, NULL,TYPE_BOOLEAN, 1); config_item_add(config_definition, CONFIG_ITEM_ID_ERROR_LOG_KEEP_N_DAYS, "Error_Log_Keep_N_Days", "7", _("Keep N days of error log"), _("Keep N days of error log. Compress recent logs and remove too old ones"), NULL, NULL,TYPE_INT, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_DROP_FILE, "Drop_File", "/" LOCALSTATEDIR "/perfparse.drop", _("File for dropped lines"), _("When perfparse cannot parse a line, it drops it to that file"), NULL, "--drop-file", TYPE_STRING, 1); config_item_add(config_definition, CONFIG_ITEM_ID_DROP_FILE_ROTATE, "Drop_File_Rotate", "no", "", "", NULL, NULL,TYPE_BOOLEAN, 1); config_item_add(config_definition, CONFIG_ITEM_ID_DROP_FILE_KEEP_N_DAYS, "Drop_File_Keep_N_Days", "7", _("Keep N days of drop file log"), _("Keep N days of drop file log. Compress recent logs and remove too old ones"), NULL, NULL,TYPE_INT, 1); config_item_add(config_definition, CONFIG_ITEM_ID_SERVER_PORT, "Server_Port", "1976", _("Server port"), _("Port for perfparsed server\n# Put 0 or \"\" to disable the server"), "-p", "--port", TYPE_INT, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_SERVICE_LOG, "Service_Log", "/" LOCALSTATEDIR "/serviceperf.log", _("Input log source (from nagios or perfparsed)"), _("Log source from nagios (or other tools) that perfparse will scan\n# Authorized values: a file name, '-' for stdin, '|' for a fifo and '>' for a host:port socket\n# For sockets, a command 'history' will be sent before retreiving the data"), "-l", "--serviceperf-log", TYPE_STRING, 1); config_item_add(config_definition, CONFIG_ITEM_ID_SERVICE_LOG_SAVE_POSITION, "Service_Log_Save_Position", "yes", _("Save the read position"), _("Save the read position in the nagios log file ? If yes, perfparse will start from that position instead of from the beginning"), NULL, NULL, TYPE_BOOLEAN, 1); ! config_item_add(config_definition, CONFIG_ITEM_ID_SERVICE_LOG_POSITION_MARK_PATH, "Service_Log_Position_Mark_Path", "/" LOCALSTATEDIR "/serviceperf.mark" , _("Position mark file path"), _("Path for files containing the read position for nagios log files"), NULL, NULL, TYPE_STRING, 1); config_item_add(config_definition, CONFIG_ITEM_ID_HISTORY_START_TM, "History_Start_Tm", "-86400", _("Start timestamp for history retreiving"), _("Start timestamp for history retreiving (positive is absolute, negative is relative to end tm)"), NULL, "--history_start_tm", TYPE_INT, 1); config_item_add(config_definition, CONFIG_ITEM_ID_HISTORY_END_TM, "History_End_Tm", "-30", _("End timestamp for history retreiving"), _("End timestamp for history retreiving (positive is absolute, negative is relative to Now)"), NULL, "--history_end_tm", TYPE_INT, 1); |