System.Data.SQLite
Check-in [93f4a6f674]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add more trace priorities and adjust those used by some of the log messages.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 93f4a6f6746c316d5692aa8be635f8caffc4f70a
User & Date: mistachkin 2012-01-05 10:02:04
Context
2012-01-06
09:17
Add a 'debug' command line option and refactor how trace messages are handled. check-in: 47b1df5884 user: mistachkin tags: trunk
2012-01-05
10:02
Add more trace priorities and adjust those used by some of the log messages. check-in: 93f4a6f674 user: mistachkin tags: trunk
09:16
Modularize the way test files / databases are cleaned up. Log the overall result of the VS designer components installer. Also, use the 'Higher' trace priority more consistently. check-in: 33948813dd user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/installer.eagle.

    70     70   
    71     71     cleanupFile $fileName
    72     72   } -body {
    73     73     set output ""
    74     74   
    75     75     set code [catch {
    76     76       testClrExec $installerExeFile [list -eventflags Wait -stdout output \
    77         -        -success 0] -debugPriority Lowest -tracePriority High -install true \
           77  +        -success 0] -debugPriority Lowest -tracePriority MediumHigh \
    78     78           -noRuntimeVersion true -noCompact true -noNetFx40 true -noVs2010 true \
    79         -        -whatIf true -verbose true -confirm true \
           79  +        -whatIf true -verbose true -confirm true -install true \
    80     80           -logFileName [appendArgs \" [file nativename $fileName] \"] \
    81     81           -traceFormat [appendArgs \" "#{0}: {2}" \"]
    82     82     } error]
    83     83   
    84     84     tlog "---- BEGIN STDOUT OUTPUT\n"
    85     85     tlog $output
    86     86     tlog "\n---- END STDOUT OUTPUT\n"
................................................................................
   102    102   
   103    103     cleanupFile $fileName
   104    104   } -body {
   105    105     set output ""
   106    106   
   107    107     set code [catch {
   108    108       testClrExec $installerExeFile [list -eventflags Wait -stdout output \
   109         -        -success 0] -debugPriority Lowest -tracePriority High -install false \
          109  +        -success 0] -debugPriority Lowest -tracePriority MediumHigh \
   110    110           -noRuntimeVersion true -noCompact true -noNetFx40 true -noVs2010 true \
   111         -        -whatIf true -verbose true -confirm true \
          111  +        -whatIf true -verbose true -confirm true -install false \
   112    112           -logFileName [appendArgs \" [file nativename $fileName] \"] \
   113    113           -traceFormat [appendArgs \" "#{0}: {2}" \"]
   114    114     } error]
   115    115   
   116    116     tlog "---- BEGIN STDOUT OUTPUT\n"
   117    117     tlog $output
   118    118     tlog "\n---- END STDOUT OUTPUT\n"
................................................................................
   134    134   
   135    135     cleanupFile $fileName
   136    136   } -body {
   137    137     set output ""
   138    138   
   139    139     set code [catch {
   140    140       testClrExec $installerExeFile [list -eventflags Wait -stdout output \
   141         -        -success 0] -debugPriority Lowest -tracePriority High -install true \
          141  +        -success 0] -debugPriority Lowest -tracePriority MediumHigh \
   142    142           -noRuntimeVersion true -noCompact true -noNetFx20 true -noVs2008 true \
   143         -        -whatIf true -verbose true -confirm true \
          143  +        -whatIf true -verbose true -confirm true -install true \
   144    144           -logFileName [appendArgs \" [file nativename $fileName] \"] \
   145    145           -traceFormat [appendArgs \" "#{0}: {2}" \"]
   146    146     } error]
   147    147   
   148    148     tlog "---- BEGIN STDOUT OUTPUT\n"
   149    149     tlog $output
   150    150     tlog "\n---- END STDOUT OUTPUT\n"
................................................................................
   166    166   
   167    167     cleanupFile $fileName
   168    168   } -body {
   169    169     set output ""
   170    170   
   171    171     set code [catch {
   172    172       testClrExec $installerExeFile [list -eventflags Wait -stdout output \
   173         -        -success 0] -debugPriority Lowest -tracePriority High -install false \
          173  +        -success 0] -debugPriority Lowest -tracePriority MediumHigh \
   174    174           -noRuntimeVersion true -noCompact true -noNetFx20 true -noVs2008 true \
   175         -        -whatIf true -verbose true -confirm true \
          175  +        -whatIf true -verbose true -confirm true -install false \
   176    176           -logFileName [appendArgs \" [file nativename $fileName] \"] \
   177    177           -traceFormat [appendArgs \" "#{0}: {2}" \"]
   178    178     } error]
   179    179   
   180    180     tlog "---- BEGIN STDOUT OUTPUT\n"
   181    181     tlog $output
   182    182     tlog "\n---- END STDOUT OUTPUT\n"

Changes to tools/install/Installer.cs.

    94     94       [Flags()]
    95     95       public enum TracePriority
    96     96       {
    97     97           None = 0x0,
    98     98           Lowest = 0x1,
    99     99           Lower = 0x2,
   100    100           Low = 0x4,
   101         -        Medium = 0x8,
   102         -        High = 0x10,
   103         -        Higher = 0x20,
   104         -        Highest = 0x40,
          101  +        MediumLow = 0x8,
          102  +        Medium = 0x10,
          103  +        MediumHigh = 0x20,
          104  +        High = 0x40,
          105  +        Higher = 0x80,
          106  +        Highest = 0x100,
   105    107           Default = Medium
   106    108       }
   107    109       #endregion
   108    110   
   109    111       ///////////////////////////////////////////////////////////////////////////
   110    112   
   111    113       #region Installer Class
................................................................................
  2664   2666   
  2665   2667                       //
  2666   2668                       // NOTE: Show where we are running from and how we were
  2667   2669                       //       invoked.
  2668   2670                       //
  2669   2671                       string location = assembly.Location;
  2670   2672   
  2671         -                    TraceOps.DebugAndTrace(TracePriority.Medium,
         2673  +                    TraceOps.DebugAndTrace(TracePriority.MediumLow,
  2672   2674                           debugCallback, traceCallback, String.Format(
  2673   2675                           "Running executable is: {0}", ForDisplay(location)),
  2674   2676                           traceCategory);
  2675   2677   
  2676         -                    TraceOps.DebugAndTrace(TracePriority.Medium,
         2678  +                    TraceOps.DebugAndTrace(TracePriority.MediumLow,
  2677   2679                           debugCallback, traceCallback, String.Format(
  2678   2680                           "Original command line is: {0}",
  2679   2681                           Environment.CommandLine), traceCategory);
  2680   2682   
  2681   2683                       if (!configuration.whatIf)
  2682   2684                       {
  2683   2685                           //
  2684   2686                           // NOTE: If the debugger is attached and What-If mode
  2685   2687                           //       is [now] disabled, issue a warning.
  2686   2688                           //
  2687   2689                           if (Debugger.IsAttached)
  2688         -                            TraceOps.DebugAndTrace(TracePriority.Medium,
         2690  +                            TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  2689   2691                                   debugCallback, traceCallback,
  2690   2692                                   "Forced to disable \"what-if\" mode with " +
  2691   2693                                   "debugger attached.", traceCategory);
  2692   2694                       }
  2693   2695                       else
  2694   2696                       {
  2695         -                        TraceOps.DebugAndTrace(TracePriority.High,
         2697  +                        TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  2696   2698                               debugCallback, traceCallback,
  2697   2699                               "No actual changes will be made to this " +
  2698   2700                               "system because \"what-if\" mode is enabled.",
  2699   2701                               traceCategory);
  2700   2702                       }
  2701   2703   
  2702   2704                       //
................................................................................
  3752   3754   
  3753   3755                       directory = Path.Combine(directory, "Config");
  3754   3756   
  3755   3757                       if (!Directory.Exists(directory))
  3756   3758                       {
  3757   3759                           TraceOps.DebugAndTrace(TracePriority.Low,
  3758   3760                               debugCallback, traceCallback, String.Format(
  3759         -                            ".NET Framework {0} directory {1} does not exist, " +
  3760         -                            "skipping...", ForDisplay(frameworkVersion),
         3761  +                            ".NET Framework {0} directory {1} does not " +
         3762  +                            "exist, skipping...", ForDisplay(frameworkVersion),
  3761   3763                               ForDisplay(directory)), traceCategory);
  3762   3764   
  3763   3765                           continue;
  3764   3766                       }
  3765   3767   
  3766   3768                       string fileName = Path.Combine(directory, "machine.config");
  3767   3769   
................................................................................
  5165   5167                           configuration, true, ref error))
  5166   5168                   {
  5167   5169                       TraceOps.ShowMessage(TracePriority.Highest,
  5168   5170                           debugCallback, traceCallback, thisAssembly,
  5169   5171                           error, traceCategory, MessageBoxButtons.OK,
  5170   5172                           MessageBoxIcon.Error);
  5171   5173   
  5172         -                    TraceOps.DebugAndTrace(TracePriority.High,
         5174  +                    TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5173   5175                           debugCallback, traceCallback, "Failure.",
  5174   5176                           traceCategory);
  5175   5177   
  5176   5178                       return 1; /* FAILURE */
  5177   5179                   }
  5178   5180                   #endregion
  5179   5181   
................................................................................
  5293   5295                                   ref error))
  5294   5296                           {
  5295   5297                               TraceOps.ShowMessage(TracePriority.Highest,
  5296   5298                                   debugCallback, traceCallback, thisAssembly,
  5297   5299                                   error, traceCategory, MessageBoxButtons.OK,
  5298   5300                                   MessageBoxIcon.Error);
  5299   5301   
  5300         -                            TraceOps.DebugAndTrace(TracePriority.High,
         5302  +                            TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5301   5303                                   debugCallback, traceCallback, "Failure.",
  5302   5304                                   traceCategory);
  5303   5305   
  5304   5306                               return 1; /* FAILURE */
  5305   5307                           }
  5306   5308                       }
  5307   5309                       #endregion
................................................................................
  5323   5325                                   ref saved, ref error))
  5324   5326                           {
  5325   5327                               TraceOps.ShowMessage(TracePriority.Highest,
  5326   5328                                   debugCallback, traceCallback, thisAssembly,
  5327   5329                                   error, traceCategory, MessageBoxButtons.OK,
  5328   5330                                   MessageBoxIcon.Error);
  5329   5331   
  5330         -                            TraceOps.DebugAndTrace(TracePriority.High,
         5332  +                            TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5331   5333                                   debugCallback, traceCallback, "Failure.",
  5332   5334                                   traceCategory);
  5333   5335   
  5334   5336                               return 1; /* FAILURE */
  5335   5337                           }
  5336   5338                       }
  5337   5339                       #endregion
................................................................................
  5349   5351                                   ref error))
  5350   5352                           {
  5351   5353                               TraceOps.ShowMessage(TracePriority.Highest,
  5352   5354                                   debugCallback, traceCallback, thisAssembly,
  5353   5355                                   error, traceCategory, MessageBoxButtons.OK,
  5354   5356                                   MessageBoxIcon.Error);
  5355   5357   
  5356         -                            TraceOps.DebugAndTrace(TracePriority.High,
         5358  +                            TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5357   5359                                   debugCallback, traceCallback, "Failure.",
  5358   5360                                   traceCategory);
  5359   5361   
  5360   5362                               return 1; /* FAILURE */
  5361   5363                           }
  5362   5364                       }
  5363   5365                       #endregion
................................................................................
  5375   5377                                   ref error))
  5376   5378                           {
  5377   5379                               TraceOps.ShowMessage(TracePriority.Highest,
  5378   5380                                   debugCallback, traceCallback, thisAssembly,
  5379   5381                                   error, traceCategory, MessageBoxButtons.OK,
  5380   5382                                   MessageBoxIcon.Error);
  5381   5383   
  5382         -                            TraceOps.DebugAndTrace(TracePriority.High,
         5384  +                            TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5383   5385                                   debugCallback, traceCallback, "Failure.",
  5384   5386                                   traceCategory);
  5385   5387   
  5386   5388                               return 1; /* FAILURE */
  5387   5389                           }
  5388   5390                       }
  5389   5391                       #endregion
................................................................................
  5401   5403                                   ref error))
  5402   5404                           {
  5403   5405                               TraceOps.ShowMessage(TracePriority.Highest,
  5404   5406                                   debugCallback, traceCallback, thisAssembly,
  5405   5407                                   error, traceCategory, MessageBoxButtons.OK,
  5406   5408                                   MessageBoxIcon.Error);
  5407   5409   
  5408         -                            TraceOps.DebugAndTrace(TracePriority.High,
         5410  +                            TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5409   5411                                   debugCallback, traceCallback, "Failure.",
  5410   5412                                   traceCategory);
  5411   5413   
  5412   5414                               return 1; /* FAILURE */
  5413   5415                           }
  5414   5416                       }
  5415   5417                       #endregion
  5416   5418   
  5417   5419                       ///////////////////////////////////////////////////////////
  5418   5420   
  5419   5421                       #region Log Summary
  5420         -                    TraceOps.DebugAndTrace(TracePriority.High,
         5422  +                    TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5421   5423                           debugCallback, traceCallback, String.Format(
  5422   5424                           "subKeysCreated = {0}, subKeysDeleted = {1}, " +
  5423   5425                           "keyValuesSet = {2}, keyValuesDeleted = {3}",
  5424   5426                           ForDisplay(RegistryHelper.SubKeysCreated),
  5425   5427                           ForDisplay(RegistryHelper.SubKeysDeleted),
  5426   5428                           ForDisplay(RegistryHelper.KeyValuesSet),
  5427   5429                           ForDisplay(RegistryHelper.KeyValuesDeleted)),
  5428   5430                           traceCategory);
  5429   5431                       #endregion
  5430   5432   
  5431   5433                       ///////////////////////////////////////////////////////////
  5432   5434   
  5433         -                    TraceOps.DebugAndTrace(TracePriority.High,
         5435  +                    TraceOps.DebugAndTrace(TracePriority.MediumHigh,
  5434   5436                           debugCallback, traceCallback, "Success.",
  5435   5437                           traceCategory);
  5436   5438   
  5437   5439                       return 0; /* SUCCESS */
  5438   5440                   }
  5439   5441               }
  5440   5442               catch (Exception e)