From 0e41fb8be9690ca7b81ec4df0734ead1978a9cf0 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 27 Jan 2021 20:35:12 -0600 Subject: When logging at the debug level, log errors from all sources. --- src/engine/engine.vcxproj | 1 + src/engine/inc/burnsources.h | 4 ++++ src/engine/precomp.h | 3 +-- src/stub/precomp.h | 3 +-- src/stub/stub.cpp | 14 +++++++++++++- 5 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 src/engine/inc/burnsources.h diff --git a/src/engine/engine.vcxproj b/src/engine/engine.vcxproj index 52f71b1d..3db6802b 100644 --- a/src/engine/engine.vcxproj +++ b/src/engine/engine.vcxproj @@ -119,6 +119,7 @@ + diff --git a/src/engine/inc/burnsources.h b/src/engine/inc/burnsources.h new file mode 100644 index 00000000..bff79ed5 --- /dev/null +++ b/src/engine/inc/burnsources.h @@ -0,0 +1,4 @@ +#pragma once +// 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. + +#define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL diff --git a/src/engine/precomp.h b/src/engine/precomp.h index a8a656d1..c0019476 100644 --- a/src/engine/precomp.h +++ b/src/engine/precomp.h @@ -20,8 +20,7 @@ #include #include - -#define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL +#include #include #include diff --git a/src/stub/precomp.h b/src/stub/precomp.h index ad0988b5..bb7ded9c 100644 --- a/src/stub/precomp.h +++ b/src/stub/precomp.h @@ -5,8 +5,7 @@ #include #include - -#define DUTIL_SOURCE_DEFAULT DUTIL_SOURCE_EXTERNAL +#include #include #include diff --git a/src/stub/stub.cpp b/src/stub/stub.cpp index d3ace1f3..0cb202e0 100644 --- a/src/stub/stub.cpp +++ b/src/stub/stub.cpp @@ -87,7 +87,19 @@ static void CALLBACK BurnTraceError( __in va_list args ) { - if (DUTIL_SOURCE_DEFAULT == source) + BOOL fLog = FALSE; + + switch (source) + { + case DUTIL_SOURCE_DEFAULT: + fLog = TRUE; + break; + default: + fLog = REPORT_VERBOSE < LogGetLevel(); + break; + } + + if (fLog) { LogErrorStringArgs(hrError, szFormat, args); } -- cgit v1.2.3-55-g6feb