aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-01-24 14:34:43 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-01-24 14:34:43 +0000
commit8120c3e103a134b905d723f2a9724e9ac0d448ec (patch)
tree69130f34320dd5a105726cd55c9dd6ce22be3ed1
parent975ecfc8b8a3bbe6c4fd78bdc392cd11234c80b0 (diff)
downloadmailfromd-8120c3e103a134b905d723f2a9724e9ac0d448ec.tar.gz
mailfromd-8120c3e103a134b905d723f2a9724e9ac0d448ec.tar.bz2
Fix handling of the --log-tag option.
git-svn-id: file:///svnroot/mailfromd/branches/gmach@1593 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r--ChangeLog2
-rw-r--r--pies/pies.c6
-rw-r--r--pmult/pmult.c6
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 50a99d26..2369688f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2008-01-24 Sergey Poznyakoff <gray@gnu.org.ua>
+ * pies/pies.c, pmult/pmult.c: Fix handling of the --log-tag option.
+
* pies/progman.c (prog_start): Remove unconditional debugging
output.
* gacopyz/gacopyz.h (SMI_LOG_PROTO): New debugging level.
diff --git a/pies/pies.c b/pies/pies.c
index 90af1a37..f922fc18 100644
--- a/pies/pies.c
+++ b/pies/pies.c
@@ -17,6 +17,7 @@
#include "pies.h"
int log_to_stderr; /* Use stderr for logging */
+char *log_tag; /* override mu_log_tag */
mu_log_level_t debug_level;
mu_debug_t pmult_debug;
struct pies_privs_data pies_user;
@@ -36,6 +37,9 @@ log_setup (int want_stderr)
mu_debug_t debug;
mu_diag_get_debug (&debug);
+
+ if (log_tag)
+ mu_log_tag = log_tag;
if (!want_stderr)
{
@@ -379,7 +383,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
break;
case OPTION_LOG_TAG:
- mu_argp_node_list_new (&lst, "log-tag", arg);
+ log_tag = arg;
break;
case ARGP_KEY_INIT:
diff --git a/pmult/pmult.c b/pmult/pmult.c
index 9f922ecb..29742f57 100644
--- a/pmult/pmult.c
+++ b/pmult/pmult.c
@@ -72,6 +72,7 @@ const char *package_bugreport = "<" PACKAGE_BUGREPORT ">";
char *portspec; /* Communication socket */
int log_to_stderr; /* Use stderr for logging */
+char *log_tag; /* override mu_log_tag */
mu_log_level_t debug_level; /* Debug verbosity level */
mu_debug_t pmult_debug; /* Debugging object */
static pthread_mutex_t pmult_debug_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -145,6 +146,9 @@ log_setup (int want_stderr)
mu_debug_t debug;
mu_diag_get_debug (&debug);
+
+ if (log_tag)
+ mu_log_tag = log_tag;
if (!want_stderr)
{
@@ -518,7 +522,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
break;
case OPTION_LOG_TAG:
- mu_argp_node_list_new (&lst, "log-tag", arg);
+ log_tag = arg;
break;
case ARGP_KEY_INIT:

Return to:

Send suggestions and report system problems to the System administrator.