LOGGING: configure logging from the vty

We can now configure logging to (multiple) files, stderr and syslog
from the vty command line in a persistent way (config file)
diff --git a/src/logging.c b/src/logging.c
index 4452862..876a352 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -41,7 +41,7 @@
 
 static struct log_context log_context;
 static void *tall_log_ctx = NULL;
-static LLIST_HEAD(target_list);
+LLIST_HEAD(osmo_log_target_list);
 
 static const struct value_string loglevel_strs[] = {
 	{ 0,		"EVERYTHING" },
@@ -176,7 +176,7 @@
 {
 	struct log_target *tar;
 
-	llist_for_each_entry(tar, &target_list, entry) {
+	llist_for_each_entry(tar, &osmo_log_target_list, entry) {
 		struct log_category *category;
 		int output = 0;
 
@@ -239,7 +239,7 @@
 
 void log_add_target(struct log_target *target)
 {
-	llist_add_tail(&target->entry, &target_list);
+	llist_add_tail(&target->entry, &osmo_log_target_list);
 }
 
 void log_del_target(struct log_target *target)
@@ -338,6 +338,7 @@
 	if (!target)
 		return NULL;
 
+	target->type = LOG_TGT_TYPE_STDERR;
 	target->tgt_file.out = stderr;
 	target->output = _file_output;
 	return target;
@@ -354,6 +355,7 @@
 	if (!target)
 		return NULL;
 
+	target->type = LOG_TGT_TYPE_FILE;
 	target->tgt_file.out = fopen(fname, "a");
 	if (!target->tgt_file.out)
 		return NULL;
@@ -365,6 +367,22 @@
 	return target;
 }
 
+struct log_target *log_target_find(int type, const char *fname)
+{
+	struct log_target *tgt;
+
+	llist_for_each_entry(tgt, &osmo_log_target_list, entry) {
+		if (tgt->type != type)
+			continue;
+		if (tgt->type == LOG_TGT_TYPE_FILE) {
+			if (!strcmp(fname, tgt->tgt_file.fname))
+				return tgt;
+		} else
+			return tgt;
+	}
+	return NULL;
+}
+
 void log_target_destroy(struct log_target *target)
 {