Index: trunk/psModules/src/config/pmConfig.c
===================================================================
--- trunk/psModules/src/config/pmConfig.c	(revision 5435)
+++ trunk/psModules/src/config/pmConfig.c	(revision 5516)
@@ -3,6 +3,6 @@
  *  @author PAP, IfA
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-20 23:06:24 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-11-15 20:09:03 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -11,13 +11,9 @@
 #include <stdio.h>
 #include <string.h>
-#include <assert.h>
 #include "pslib.h"
-//#include "psAdditionals.h"
 #include "pmConfig.h"
 
 #define PS_SITE "PS_SITE"               // Name of the environment variable containing the site config file
-#define PS_DEFAULT_SITE "ipprc.config"     // Default site config file
-
-
+#define PS_DEFAULT_SITE "ipprc.config"  // Default site config file
 
 /** readConfig
@@ -32,5 +28,6 @@
     const char *description)            // Description of file
 {
-    int numBadLines = 0;  // Number of bad lines in config file
+    int numBadLines = 0;
+
     psLogMsg(__func__, PS_LOG_INFO, "Loading %s configuration from file %s\n",
              description, name);
@@ -56,4 +53,6 @@
 must take precedence override the values set here.  This must be, somehow,
 coded.
+ 
+XXX: Must load camera and recipe configuration if specified in the command line.
  *****************************************************************************/
 bool pmConfigRead(
@@ -119,4 +118,5 @@
     // file and store in psMetadata struct site.
     //
+
     if (!readConfig(site, siteName, "site")) {
         return false;
@@ -249,4 +249,16 @@
     }
 
+    //
+    // Allow command line options to override defaults for logging.
+    // XXX: Is it appropriate to use the ArgVerbosity function for this?
+    //   A: it removes the options from the command line.
+    //   B: will the pmConfigRead function always be called on initialization.
+    //
+    psS32 saveLogLevel = psLogGetLevel();
+    psArgumentVerbosity(argc, argv);
+    // XXX: substitute the string for the default log level for "2".
+    if (2 == psLogGetLevel()) {
+        psLogSetLevel(saveLogLevel);
+    }
     return(true);
 }
@@ -266,6 +278,6 @@
     // Apply the rules
     psMetadataIterator *ruleIter = psMetadataIteratorAlloc(rule, PS_LIST_HEAD, NULL); // Rule iterator
-    psMetadataItem *ruleItem = NULL; // Item from the metadata
-    bool match = true;   // Does it match?
+    psMetadataItem *ruleItem = NULL;    // Item from the metadata
+    bool match = true;                  // Does it match?
     while ((ruleItem = psMetadataGetAndIncrement(ruleIter)) && match) {
         // Check for the existence of the rule
@@ -389,9 +401,9 @@
     const char *recipeName)
 {
-    assert(camera);
-    assert(recipeName);
-
-    psMetadata *recipe = NULL; // Recipe to read
-    bool mdok = true;   // Status of MD lookup
+    PS_ASSERT_PTR_NON_NULL(camera, false);
+    PS_ASSERT_PTR_NON_NULL(recipeName, false);
+
+    psMetadata *recipe = NULL;          // Recipe to read
+    bool mdok = true;                   // Status of MD lookup
     psMetadata *recipes = psMetadataLookupMD(&mdok, camera, "RECIPES"); // The list of recipes
     if (! mdok || ! recipes) {
