-
Change Request
-
Resolution: Duplicate
-
Trivial
-
None
-
2.2.0
-
None
Many functions use debug logging, for example
zabbix_log(LOG_LEVEL_DEBUG, "In %s() sensor:'%s@[%s]:%d'", __function_name,
sensor_id_to_str(id_str, sizeof(id_str), id, id_type, id_sz), h->ip, h->port);
...
zabbix_log(LOG_LEVEL_DEBUG, "End of %s():%p", __function_name, s);
On busy production systems DebugLevel is normally not set to LOG_LEVEL_DEBUG but still all arguments to zabbix_log() are evaluated and discarded - a waste of CPU time. Let's avoid unnecessary calling zabbix_log() in this case.