X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_log.h;h=919563c8d0df56bb3ab77ae93e075ec983bf84ef;hb=b4d63fb622400449d78bc1ea3e18a6ef14e8d7da;hp=f83a0d9543ad983d9d9cd557a81899783d1605dd;hpb=fd4a5ce87d043c619b704c5bdaad73eb599e90ca;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h index f83a0d9543..919563c8d0 100644 --- a/lib/librte_eal/common/include/rte_log.h +++ b/lib/librte_eal/common/include/rte_log.h @@ -77,6 +77,8 @@ extern struct rte_logs rte_logs; #define RTE_LOGTYPE_PORT 0x00002000 /**< Log related to port. */ #define RTE_LOGTYPE_TABLE 0x00004000 /**< Log related to table. */ #define RTE_LOGTYPE_PIPELINE 0x00008000 /**< Log related to pipeline. */ +#define RTE_LOGTYPE_MBUF 0x00010000 /**< Log related to mbuf. */ +#define RTE_LOGTYPE_CRYPTODEV 0x00020000 /**< Log related to cryptodev. */ /* these log types can be used in an application */ #define RTE_LOGTYPE_USER1 0x01000000 /**< User-defined log type 1. */ @@ -176,39 +178,6 @@ int rte_log_cur_msg_loglevel(void); */ int rte_log_cur_msg_logtype(void); -/** - * Enable or disable the history (enabled by default) - * - * @param enable - * true to enable, or 0 to disable history. - */ -void rte_log_set_history(int enable); - -/** - * Dump the log history to a file - * - * @param f - * A pointer to a file for output - */ -void rte_log_dump_history(FILE *f); - -/** - * Add a log message to the history. - * - * This function can be called from a user-defined log stream. It adds - * the given message in the history that can be dumped using - * rte_log_dump_history(). - * - * @param buf - * A data buffer containing the message to be saved in the history. - * @param size - * The length of the data buffer. - * @return - * - 0: Success. - * - (-ENOBUFS) if there is no room to store the message. - */ -int rte_log_add_in_history(const char *buf, size_t size); - /** * Generates a log message. * @@ -289,19 +258,15 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap) * @param t * The log type, for example, EAL. The short name is expanded by the * macro, so it cannot be an integer value. - * @param fmt + * @param ... * The fmt string, as in printf(3), followed by the variable arguments * required by the format. - * @param args - * The variable list of arguments according to the format string. * @return * - 0: Success. * - Negative on error. */ #define RTE_LOG(l, t, ...) \ - (void)(((RTE_LOG_ ## l <= RTE_LOG_LEVEL) && \ - (RTE_LOG_ ## l <= rte_logs.level) && \ - (RTE_LOGTYPE_ ## t & rte_logs.type)) ? \ + (void)((RTE_LOG_ ## l <= RTE_LOG_LEVEL) ? \ rte_log(RTE_LOG_ ## l, \ RTE_LOGTYPE_ ## t, # t ": " __VA_ARGS__) : \ 0)