layers: Default MemTracker and DrawState to verbose stdout mode when no settings...
authorTobin Ehlis <tobin@lunarg.com>
Thu, 8 Jan 2015 21:26:53 +0000 (14:26 -0700)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Thu, 5 Feb 2015 00:58:05 +0000 (17:58 -0700)
layers/draw_state.c
layers/mem_tracker.c

index d8527bb9777e6be1acd7e84cb0ce41be88769d52..b4f303e811f2984ca159b1689729cb205760b944 100644 (file)
@@ -43,7 +43,7 @@ pthread_mutex_t globalLock = PTHREAD_MUTEX_INITIALIZER;
 
 // Ptr to LL of dbg functions
 static XGL_LAYER_DBG_FUNCTION_NODE *g_pDbgFunctionHead = NULL;
-static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_ERROR;
+static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_INFO;
 static XGL_LAYER_DBG_ACTION g_debugAction = XGL_DBG_LAYER_ACTION_LOG_MSG;
 static FILE *g_logFile = NULL;
 
@@ -922,20 +922,21 @@ static void synchAndPrintDSConfig()
 static void initDrawState()
 {
     const char *strOpt;
-    // initialize MemTracker options
+    // initialize DrawState options
     strOpt = getLayerOption("DrawStateReportLevel");
     if (strOpt != NULL)
         g_reportingLevel = atoi(strOpt);
+
     strOpt = getLayerOption("DrawStateDebugAction");
     if (strOpt != NULL)
-       g_debugAction = atoi(strOpt);
+        g_debugAction = atoi(strOpt);
+
     if (g_debugAction & XGL_DBG_LAYER_ACTION_LOG_MSG)
     {
         strOpt = getLayerOption("DrawStateLogFilename");
         if (strOpt)
         {
             g_logFile = fopen(strOpt, "w");
-
         }
         if (g_logFile == NULL)
             g_logFile = stdout;
index 1d971f51268d616846a42bdaa2b8c5d924a849c4..55b7be833c29920750f7286fce21f2338dc53294 100644 (file)
@@ -39,7 +39,7 @@ static pthread_once_t g_initOnce = PTHREAD_ONCE_INIT;
 
 // Ptr to LL of dbg functions
 static XGL_LAYER_DBG_FUNCTION_NODE *g_pDbgFunctionHead = NULL;
-static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_ERROR;
+static XGL_LAYER_DBG_REPORT_LEVEL g_reportingLevel = XGL_DBG_LAYER_LEVEL_INFO;
 static XGL_LAYER_DBG_ACTION g_debugAction = XGL_DBG_LAYER_ACTION_LOG_MSG;
 static FILE *g_logFile = NULL;
 
@@ -838,16 +838,17 @@ static void initMemTracker()
     strOpt = getLayerOption("MemTrackerReportLevel");
     if (strOpt != NULL)
         g_reportingLevel = atoi(strOpt);
+
     strOpt = getLayerOption("MemTrackerDebugAction");
     if (strOpt != NULL)
-       g_debugAction = atoi(strOpt);
+        g_debugAction = atoi(strOpt);
+
     if (g_debugAction & XGL_DBG_LAYER_ACTION_LOG_MSG)
     {
         strOpt = getLayerOption("MemTrackerLogFilename");
         if (strOpt)
         {
             g_logFile = fopen(strOpt, "w");
-
         }
         if (g_logFile == NULL)
             g_logFile = stdout;