Explicitly call tr_log_open when we're not being used as a library
authorAdam Bishop <adam@omega.org.uk>
Wed, 11 Mar 2015 14:47:27 +0000 (14:47 +0000)
committerAdam Bishop <adam@omega.org.uk>
Wed, 11 Mar 2015 14:59:46 +0000 (14:59 +0000)
tid/example/tidc_main.c
tid/example/tids_main.c
tr/tr_main.c

index 9f27018..7050eb8 100644 (file)
@@ -99,6 +99,9 @@ int main (int argc,
   int rc;
   gss_ctx_id_t gssctx;
 
+  /* Use standalone logging */
+  tr_log_open();
+
   /* set logging levels */
   talloc_set_log_stderr();
   tr_log_threshold(LOG_CRIT);
index b322de4..2570de9 100644 (file)
@@ -270,6 +270,9 @@ int main (int argc,
     exit(1);
   }
 
+  /* Use standalone logging */
+  tr_log_open();
+
   /* set logging levels */
   tr_log_threshold(LOG_CRIT);
   tr_console_threshold(LOG_DEBUG);
index 9c8f909..82d3ee9 100644 (file)
@@ -252,6 +252,9 @@ int main (int argc, const char *argv[])
 
   /* parse command-line arguments? -- TBD */
 
+  /* Use standalone logging */
+  tr_log_open();
+
   /* create a Trust Router instance */
   if (NULL == (tr = tr_create())) {
     tr_crit("Unable to create Trust Router instance, exiting.");