Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10889

Check for log level in zabbix_log() macro instead of __zbx_zabbix_log() function.

    XMLWordPrintable

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 50 (Mar 2019), Sprint 51 (Apr 2019)
    • Story Points:
      0.25

      Description

      In several places in our code the following pattern is used for logging.

      if (SUCCEED == zabbix_check_log_level(LOG_LEVEL_DEBUG))
      {
           zabbix_log(LOG_LEVEL_DEBUG, ...);
      }
      

      Functionally the check for log level before calling zabbix_log() is unnecessary as __zbx_zabbix_log() checks for that itself.

      However this is done for performance considerations - to avoid adding __zbx_zabbix_log() frame to the stack.

      A more generic and universal approach would be to move the check outside of __zbx_zabbix_log() into zabbix_log() macro.

        Attachments

          Activity

            People

            Assignee:
            viktors.tjarve Viktors Tjarve
            Reporter:
            sandis.neilands Sandis Neilands (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: