mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-20 07:40:03 +01:00
log: rename back to wp_log_set_level
This commit is contained in:
parent
82df32b0b0
commit
d8a345a30c
4 changed files with 6 additions and 6 deletions
|
|
@ -300,7 +300,7 @@ wp_core_constructed (GObject *object)
|
||||||
p = (struct pw_properties *) pw_context_get_properties (self->pw_context);
|
p = (struct pw_properties *) pw_context_get_properties (self->pw_context);
|
||||||
if (!g_getenv("WIREPLUMBER_DEBUG") &&
|
if (!g_getenv("WIREPLUMBER_DEBUG") &&
|
||||||
(str = pw_properties_get(p, "log.level")) != NULL) {
|
(str = pw_properties_get(p, "log.level")) != NULL) {
|
||||||
if (!wp_log_set_global_level (str))
|
if (!wp_log_set_level (str))
|
||||||
wp_warning ("ignoring invalid log.level in config file: %s", str);
|
wp_warning ("ignoring invalid log.level in config file: %s", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -483,7 +483,7 @@ format_pw_log_level_string (gint level, const struct log_topic_pattern *patterns
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
wp_log_set_global_level (const gchar *level_str)
|
wp_log_set_level (const gchar *level_str)
|
||||||
{
|
{
|
||||||
gint level;
|
gint level;
|
||||||
GLogLevelFlags flags;
|
GLogLevelFlags flags;
|
||||||
|
|
@ -534,9 +534,9 @@ wp_log_init (gint flags)
|
||||||
if (log_state.set_pw_log)
|
if (log_state.set_pw_log)
|
||||||
pw_log_set (wp_spa_log_get_instance ());
|
pw_log_set (wp_spa_log_get_instance ());
|
||||||
|
|
||||||
if (!wp_log_set_global_level (g_getenv ("WIREPLUMBER_DEBUG"))) {
|
if (!wp_log_set_level (g_getenv ("WIREPLUMBER_DEBUG"))) {
|
||||||
wp_warning ("Ignoring invalid value in WIREPLUMBER_DEBUG");
|
wp_warning ("Ignoring invalid value in WIREPLUMBER_DEBUG");
|
||||||
wp_log_set_global_level (NULL);
|
wp_log_set_level (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log_state.set_pw_log) {
|
if (log_state.set_pw_log) {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ WP_PRIVATE_API
|
||||||
void wp_log_init (gint flags);
|
void wp_log_init (gint flags);
|
||||||
|
|
||||||
WP_API
|
WP_API
|
||||||
gboolean wp_log_set_global_level (const gchar *log_level);
|
gboolean wp_log_set_level (const gchar *log_level);
|
||||||
|
|
||||||
typedef struct _WpLogTopic WpLogTopic;
|
typedef struct _WpLogTopic WpLogTopic;
|
||||||
struct _WpLogTopic {
|
struct _WpLogTopic {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ on_metadata_changed (WpMetadata *m, guint32 subject,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (spa_streq(key, "log.level"))
|
if (spa_streq(key, "log.level"))
|
||||||
wp_log_set_global_level (value ? value : "2");
|
wp_log_set_level (value ? value : "2");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue