rework log handling

- make logging events more structured
- add fine grained control over log events
- make it possible to receive more detailed events via ubus

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2021-04-16 14:15:15 +02:00
parent 6d62833ca1
commit 2b1c740ce3
11 changed files with 529 additions and 161 deletions

View File

@@ -340,9 +340,6 @@ usteer_local_node_update(struct uloop_timeout *timeout)
ln = container_of(timeout, struct usteer_local_node, update);
node = &ln->node;
MSG_T("local_sta_udpate", "timeout (%u) expired\n",
config.local_sta_update);
list_for_each_entry(h, &node_handlers, list) {
if (!h->update_node)
continue;
@@ -476,9 +473,13 @@ node_list_cb(struct ubus_context *ctx, struct ubus_object_data *obj, void *priv)
void config_set_node_up_script(struct blob_attr *data)
{
const char *val = blobmsg_get_string(data);
const char *val;
struct usteer_node *node;
if (!data)
return;
val = blobmsg_get_string(data);
if (node_up_script && !strcmp(val, node_up_script))
return;