@joebigelow / wix / commits / 0e41fb8b

When logging at the debug level, log errors from all sources.

Sean Hall committed Jan 27, 2021 at 20:35 UTC 0e41fb8be9690ca7b81ec4df0734ead1978a9cf0
5 files changed +20 -5
src/engine/engine.vcxproj
+1
@@ -119,6 +119,7 @@
119 <ClInclude Include="EngineForExtension.h" />
120 <ClInclude Include="exeengine.h" />
121 <ClInclude Include="externalengine.h" />
122 + <ClInclude Include="inc\burnsources.h" />
123 <ClInclude Include="inc\engine.h" />
124 <ClInclude Include="logging.h" />
125 <ClInclude Include="manifest.h" />
src/engine/inc/burnsources.h new
+4
@@ -0,0 +1,4 @@
1 +#pragma once
2 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3 +
4 +#define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL
src/engine/precomp.h
+1 -2
@@ -20,8 +20,7 @@
20 #include <stddef.h>
21
22 #include <dutilsources.h>
23 -
24 -#define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL
23 +#include <burnsources.h>
24
25 #include <dutil.h>
26 #include <verutil.h>
src/stub/precomp.h
+1 -2
@@ -5,8 +5,7 @@
5 #include <windows.h>
6
7 #include <dutilsources.h>
8 -
9 -#define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL
8 +#include <burnsources.h>
9
10 #include <dutil.h>
11 #include <apputil.h>
src/stub/stub.cpp
+13 -1
@@ -87,7 +87,19 @@ static void CALLBACK BurnTraceError(
87 __in va_list args
88 )
89 {
90 - if (DUTIL_SOURCE_DEFAULT == source)
90 + BOOL fLog = FALSE;
91 +
92 + switch (source)
93 + {
94 + case DUTIL_SOURCE_DEFAULT:
95 + fLog = TRUE;
96 + break;
97 + default:
98 + fLog = REPORT_VERBOSE < LogGetLevel();
99 + break;
100 + }
101 +
102 + if (fLog)
103 {
104 LogErrorStringArgs(hrError, szFormat, args);
105 }