libsepol/cil: Add cil_get_log_level() function

Add the function cil_get_log_level() that returns the current log
level for CIL.

Signed-off-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
James Carter 2022-01-18 14:03:43 -05:00
parent 71291385cf
commit 3ffb84ec9e
2 changed files with 7 additions and 0 deletions

View file

@ -70,3 +70,8 @@ void cil_set_log_level(enum cil_log_level lvl)
{
cil_log_level = lvl;
}
enum cil_log_level cil_get_log_level(void)
{
return cil_log_level;
}

View file

@ -38,4 +38,6 @@
__attribute__ ((format(printf, 2, 0))) void cil_vlog(enum cil_log_level lvl, const char *msg, va_list args);
__attribute__ ((format(printf, 2, 3))) void cil_log(enum cil_log_level lvl, const char *msg, ...);
enum cil_log_level cil_get_log_level(void);
#endif // CIL_LOG_H_