]> git.pld-linux.org Git - packages/cacti.git/blobdiff - cacti-log-verbosity.patch
- mostly updated; one patch left + testing; new config variable path_cactilog
[packages/cacti.git] / cacti-log-verbosity.patch
index 3a25765f23643f71e69e2f969cef3b4f8960928b..b3478ff53e3993a8acf7f36ef63d93fc543ec576 100644 (file)
@@ -1,13 +1,13 @@
 --- cacti-0.8.7b/poller.php~   2008-10-05 16:58:33.000000000 +0300
 +++ cacti-0.8.7b/poller.php    2008-10-05 17:45:53.825952709 +0300
-@@ -446,7 +446,8 @@
-               $num_polling_items,
-               $rrds_processed);
+@@ -665,7 +665,8 @@ function log_cacti_stats($loop_start, $m
+       );
  
--      cacti_log("STATS: " . $cacti_stats , true, "SYSTEM");
+       $cacti_stats = vsprintf('Time:%01.4f Method:%s Processes:%s Threads:%s Hosts:%s HostsPerProcess:%s DataSources:%s RRDsProcessed:%s', $perf_data);
+-      cacti_log('STATS: ' . $cacti_stats , true, 'SYSTEM');
 +      if (read_config_option('log_verbosity') > POLLER_VERBOSITY_NONE)
-+              cacti_log("STATS: " . $cacti_stats ,true,"SYSTEM");
++              cacti_log('STATS: ' . $cacti_stats , true, 'SYSTEM');
  
        /* insert poller stats into the settings table */
-       db_execute("REPLACE INTO settings (name,value) VALUES ('stats_poller','$cacti_stats')");
+       db_execute_prepared('REPLACE INTO settings (name, value) VALUES ("stats_poller",?)', array($cacti_stats));
 
This page took 0.029981 seconds and 4 git commands to generate.