lttng: move log level name to numerical value conversions to a common util
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 27 Aug 2020 19:16:29 +0000 (15:16 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 12 Feb 2021 05:11:20 +0000 (00:11 -0500)
commit7e8f2e9cce651c81094a864bbffefcaa4bcc7a51
tree3082b76ab8250bd23c65412892098c6d8bcd95f1
parentca46af4e57aa36b03ccafbb9d002dabbc4d6b707
lttng: move log level name to numerical value conversions to a common util

Move the utils used by the `enable-event` command to convert log level
names (textual) to their values (entries in their respective enums).

Since these utils will be used by other commands in the future, the code
is cleaned-up, notably to maintain type-safety by returning specific
enums rather than casting to `int`.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I3f655bed6cd5b12cae1e93421f9d1c41ab1b6247
src/bin/lttng/Makefile.am
src/bin/lttng/commands/enable_events.c
src/bin/lttng/loglevel.c [new file with mode: 0644]
src/bin/lttng/loglevel.h [new file with mode: 0644]
This page took 0.026729 seconds and 4 git commands to generate.