OSSP CVS Repository

ossp - Check-in [1993]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1993
Date: 2002-Mar-13 15:50:37 (local)
2002-Mar-13 14:50:37 (UTC)
User:thl
Branch:
Comment: since env exists, default is there; l2_spec sets channel_levels
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_config.c      1.67 -> 1.68     4 inserted, 4 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_config.c 1.67 -> 1.68

--- lmtp2nntp_config.c   2002/03/13 14:41:13     1.67
+++ lmtp2nntp_config.c   2002/03/13 14:50:37     1.68
@@ -126,6 +126,10 @@
         fprintf(stderr, "%s:Error: failed to create L2 environment\n", ctx->progname);
         CU(ERR_EXECUTION);
     }
+    if (l2_env_levels(ctx->l2_env, L2_LEVEL_ALL, L2_LEVEL_NONE) != L2_OK) {
+        fprintf(stderr, "%s:Error: logging failed to set global logging level defaults\n", ctx->progname);
+        CU(ERR_EXECUTION);
+    }
     if (l2_env_formatter(ctx->l2_env, 'P', formatter_prefix, &ctx->ctx) != L2_OK) {
         fprintf(stderr, "%s:Error: logging failed to register prefix formatter\n", ctx->progname);
         CU(ERR_EXECUTION);
@@ -170,10 +174,6 @@
             fprintf(stderr, "%s:Error: logging failed to link child channel\n", ctx->progname);
             CU(ERR_EXECUTION);
         }
-        if (l2_channel_levels(ctx->l2, L2_LEVEL_ALL, L2_LEVEL_NONE) != L2_OK) { /* FIXME should this globalmask and flushmask be user-configurable? */
-            fprintf(stderr, "%s:Error: logging failed to set global logging level\n", ctx->progname);
-            CU(ERR_EXECUTION);
-        }
         if (l2_channel_open(ctx->l2) != L2_OK) {
             fprintf(stderr, "%s:Error: logging failed to open channel stream\n", ctx->progname);
             CU(ERR_EXECUTION);

CVSTrac 2.0.1