spa: support: remove log pattern support

The log patterns are now handled by plugin host.
This commit is contained in:
Pauli Virtanen 2023-12-23 21:24:54 +02:00 committed by Wim Taymans
parent dd8d5e1bed
commit 53ba3d0e4c
5 changed files with 1 additions and 144 deletions

View file

@ -20,8 +20,6 @@
#include <spa/utils/string.h>
#include <spa/utils/ansi.h>
#include "log-patterns.h"
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
#endif
@ -48,8 +46,6 @@ struct impl {
unsigned int colors:1;
unsigned int timestamp:1;
unsigned int line:1;
struct spa_list patterns;
};
static SPA_PRINTF_FUNC(7,0) void
@ -221,22 +217,12 @@ static void on_trace_event(struct spa_source *source)
}
}
static void
impl_log_topic_init(void *object, struct spa_log_topic *t)
{
struct impl *impl = object;
enum spa_log_level level = impl->log.level;
support_log_topic_init(&impl->patterns, level, t);
}
static const struct spa_log_methods impl_log = {
SPA_VERSION_LOG_METHODS,
.log = impl_log_log,
.logv = impl_log_logv,
.logt = impl_log_logt,
.logtv = impl_log_logtv,
.topic_init = impl_log_topic_init,
};
static int impl_get_interface(struct spa_handle *handle, const char *type, void **interface)
@ -264,8 +250,6 @@ static int impl_clear(struct spa_handle *handle)
this = (struct impl *) handle;
support_log_free_patterns(&this->patterns);
if (this->close_file && this->file != NULL)
fclose(this->file);
@ -313,7 +297,6 @@ impl_init(const struct spa_handle_factory *factory,
loop = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_Loop);
this->system = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_System);
spa_list_init(&this->patterns);
if (loop != NULL && this->system != NULL) {
this->source.func = on_trace_event;
@ -358,8 +341,6 @@ impl_init(const struct spa_handle_factory *factory,
this->close_file = true;
}
}
if ((str = spa_dict_lookup(info, SPA_KEY_LOG_PATTERNS)) != NULL)
support_log_parse_patterns(&this->patterns, str);
}
if (this->file == NULL) {
this->file = stderr;