void ib_vclog_ex(ib_context_t *ctx, int level, const char *prefix, const char *file, int line, const char *fmt, va_list ap) { IB_FTRACE_INIT(ib_vclog_ex); IB_PROVIDER_API_TYPE(logger) *api; ib_core_cfg_t *corecfg; ib_provider_inst_t *pi = NULL; ib_status_t rc; char prefix_with_pid[1024]; if (prefix != NULL) { snprintf(prefix_with_pid, 1024, "[%d] %s", getpid(), prefix); } else { snprintf(prefix_with_pid, 1024, "[%d] ", getpid()); } if (ctx != NULL) { rc = ib_context_module_config(ctx, ib_core_module(), (void *)&corecfg); if (rc == IB_OK) { pi = corecfg->pi.logger; } if (pi != NULL) { api = (IB_PROVIDER_API_TYPE(logger) *)pi->pr->api; api->vlogmsg(pi, ctx, level, prefix_with_pid, file, line, fmt, ap); IB_FTRACE_RET_VOID(); }
void DLL_PUBLIC ib_vlog_ex(ib_engine_t *ib, int level, const ib_tx_t *tx, const char *prefix, const char *file, int line, const char *fmt, va_list ap) { IB_FTRACE_INIT(); IB_PROVIDER_API_TYPE(logger) *api; ib_core_cfg_t *corecfg; ib_provider_inst_t *pi = NULL; ib_status_t rc; ib_context_t *ctx; ctx = ib_context_main(ib); if (ctx != NULL) { rc = ib_context_module_config(ctx, ib_core_module(), (void *)&corecfg); if (rc == IB_OK) { pi = corecfg->pi.logger; } if (pi != NULL) { api = (IB_PROVIDER_API_TYPE(logger) *)pi->pr->api; api->vlogmsg(pi, ctx, level, tx, prefix, file, line, fmt, ap); IB_FTRACE_RET_VOID(); }
void ib_vclog_ex(ib_context_t *ctx, int level, const char *prefix, const char *file, int line, const char *fmt, va_list ap) { IB_PROVIDER_API_TYPE(logger) *api; if (ctx->logger != NULL) { //default_logger(stderr, level, prefix, file, line, fmt, ap); api = (IB_PROVIDER_API_TYPE(logger) *)ctx->logger->pr->api; /// @todo Change to use ib_provider_inst_t api->vlogmsg(ctx->logger, ctx, level, prefix, file, line, fmt, ap); }
* @param[in] dpi The data provider instance passed to a call to a * function available from @a api. * @param[in] parent_field The parent field that contains the requested field. * This must be an IB_FTYPE_LIST. * @param[in] name The regex to use to match member field names in * @a field_name. * @param[in] name_len The length of @a pattern. * @param[out] result_field The result field. * * @returns * - IB_OK on success. * - IB_EINVAL The parent field is not a list or a dynamic type. Also * returned if @a name_len is 0. * - Other if a dynamic field fails. */ static ib_status_t ib_data_get_subfields(IB_PROVIDER_API_TYPE(data) *api, const ib_provider_inst_t *dpi, const ib_field_t *parent_field, const char *name, size_t name_len, ib_field_t **result_field) { IB_FTRACE_INIT(); assert(api); assert(dpi); assert(parent_field); assert(name); assert(result_field); ib_status_t rc;