Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-3909

Let zbx_module_init() return an arbitrary error code and log it in case of failure

XMLWordPrintable

      Regarding zbx_module_init() documentation says:

      If successful, it should return ZBX_MODULE_OK. Otherwise, it should return ZBX_MODULE_FAIL.

      If module initialization fails Zabbix prints only module name:

      		zabbix_log(LOG_LEVEL_CRIT, "cannot initialize module \"%s\"", name);
      

      Would be nice to let modules return anything but ZBX_MODULE_OK in case they feel like it. Would be nice to print this error code in Zabbix log file. This way module developers and users would have a way to diagnose module failures without the need to implement their own logging or hack Zabbix'es logging functions.

            Unassigned Unassigned
            glebs.ivanovskis Glebs Ivanovskis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: