profiling: create a LOGGER_USER id

Loggers need an ID uniquely identify them for profiling. To help with
loggers registered at runtime (library, plugins), provide a
LOGGER_USER that can be used. It won't provide per-logger details if
they have more than one, but will provide a total for all their
registered loggers.

Ticket: #7227
pull/11689/head
Jason Ish 6 months ago committed by Victor Julien
parent cc89d35256
commit 3d2820ba39

@ -493,6 +493,10 @@ typedef enum {
LOGGER_JSON_STREAM,
LOGGER_JSON_ARP,
/* An ID that can be used by loggers registered by plugins and/or
* library users. */
LOGGER_USER,
/* Must come last. */
LOGGER_SIZE,
} LoggerId;

@ -1298,6 +1298,7 @@ const char *PacketProfileLoggerIdToString(LoggerId id)
CASE_CODE(LOGGER_JSON_FRAME);
CASE_CODE(LOGGER_JSON_STREAM);
CASE_CODE(LOGGER_JSON_ARP);
CASE_CODE(LOGGER_USER);
case LOGGER_SIZE:
return "UNKNOWN";

Loading…
Cancel
Save