log: allow querying whether personal info should be shown or not
We need this when building printable representations of helper types like the MMBearerProperties object.
This commit is contained in:
@@ -213,6 +213,12 @@ log_backend_systemd_journal (const char *loc,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
mm_log_get_show_personal_info (void)
|
||||||
|
{
|
||||||
|
return personal_info;
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
mm_log_check_level_enabled (MMLogLevel level)
|
mm_log_check_level_enabled (MMLogLevel level)
|
||||||
{
|
{
|
||||||
|
23
src/mm-log.h
23
src/mm-log.h
@@ -64,17 +64,18 @@ void _mm_log (gpointer obj,
|
|||||||
const gchar *fmt,
|
const gchar *fmt,
|
||||||
...) __attribute__((__format__ (__printf__, 6, 7)));
|
...) __attribute__((__format__ (__printf__, 6, 7)));
|
||||||
|
|
||||||
gboolean mm_log_set_level (const gchar *level,
|
gboolean mm_log_set_level (const gchar *level,
|
||||||
GError **error);
|
GError **error);
|
||||||
gboolean mm_log_setup (const gchar *level,
|
gboolean mm_log_setup (const gchar *level,
|
||||||
const gchar *log_file,
|
const gchar *log_file,
|
||||||
gboolean log_journal,
|
gboolean log_journal,
|
||||||
gboolean show_ts,
|
gboolean show_ts,
|
||||||
gboolean rel_ts,
|
gboolean rel_ts,
|
||||||
gboolean show_personal_info,
|
gboolean show_personal_info,
|
||||||
GError **error);
|
GError **error);
|
||||||
gboolean mm_log_check_level_enabled (MMLogLevel level);
|
gboolean mm_log_check_level_enabled (MMLogLevel level);
|
||||||
void mm_log_shutdown (void);
|
gboolean mm_log_get_show_personal_info (void);
|
||||||
|
void mm_log_shutdown (void);
|
||||||
|
|
||||||
/* Helper used when printing a string that may be personal
|
/* Helper used when printing a string that may be personal
|
||||||
* info. Depending on the settings, we may print it as-is,
|
* info. Depending on the settings, we may print it as-is,
|
||||||
|
Reference in New Issue
Block a user