Skip to content

Commit 63cc083

Browse files
Windows write to log if no debugger attached (#1098)
* Windows write to log if no debugger attached * Added a preprocessor directive to turn on disk logging on windows
1 parent 236f2da commit 63cc083

13 files changed

+24
-0
lines changed

docs/building-custom-SKU.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Build recipe must contain the following preprocessor definitions:
2525
| HAVE_MAT_JSONHPP | on | Build with [JSON for Modern C++ library](https://github.com/nlohmann/json) |
2626
| HAVE_MAT_ZLIB | on | Use zlib for HTTP requests compression. This option must always be turned on for any high-volume telemetry project |
2727
| HAVE_MAT_LOGGING | on | Enable internal SDK tracing / debug logging |
28+
| HAVE_MAT_WIN_LOG | off | Will log statements to disk on windows if trace enabled and HAVE_MAT_LOGGING defined |
2829
| HAVE_MAT_STORAGE | on | Enable SQLite persistent offline storage |
2930
| HAVE_MAT_NETDETECT | on | _Win32 Desktop only_: Use NLM COM object for network cost detection on Windows 8+ |
3031
| HAVE_MAT_SHORT_NS | off | Use short "MAT::" namespace instead of "Microsoft::Applications::Events::" to reduce the .DLL size |

lib/include/mat/config-MIP.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define HAVE_MAT_JSONHPP
1313
#define HAVE_MAT_ZLIB
1414
#define HAVE_MAT_LOGGING
15+
#define HAVE_MAT_WIN_LOG
1516
#define HAVE_MAT_STORAGE
1617
#if defined(_WIN32)
1718
#define WIN_DESKTOP

lib/include/mat/config-MSIPC.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define HAVE_MAT_JSONHPP
1616
#define HAVE_MAT_ZLIB
1717
#define HAVE_MAT_LOGGING
18+
/* #define HAVE_MAT_WIN_LOG */
1819
#define HAVE_MAT_STORAGE
1920
#define WIN_DESKTOP
2021
#define HAVE_MAT_DEFAULT_HTTP_CLIENT

lib/include/mat/config-compact-dll.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define HAVE_MAT_JSONHPP
1414
#define HAVE_MAT_ZLIB
1515
/* #define HAVE_MAT_LOGGING */
16+
/* #define HAVE_MAT_WIN_LOG */
1617
/* #define HAVE_MAT_STORAGE */
1718
/* #define HAVE_MAT_NETDETECT */
1819
/* #define HAVE_MAT_SHORT_NS */

lib/include/mat/config-compact-exp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define HAVE_MAT_JSONHPP
1414
#define HAVE_MAT_ZLIB
1515
/* #define HAVE_MAT_LOGGING */
16+
/* #define HAVE_MAT_WIN_LOG */
1617
#define HAVE_MAT_STORAGE
1718
/* #define HAVE_MAT_NETDETECT */
1819
/* #define HAVE_MAT_SHORT_NS */

lib/include/mat/config-compact-min.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/* #define HAVE_MAT_JSONHPP */
1414
/* #define HAVE_MAT_ZLIB */
1515
/* #define HAVE_MAT_LOGGING */
16+
/* #define HAVE_MAT_WIN_LOG */
1617
/* #define HAVE_MAT_STORAGE */
1718
/* #define HAVE_MAT_NETDETECT */
1819
/* #define HAVE_MAT_SHORT_NS */

lib/include/mat/config-compact-noutc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/* #define HAVE_MAT_JSONHPP */
1414
/* #define HAVE_MAT_ZLIB */
1515
/* #define HAVE_MAT_LOGGING */
16+
/* #define HAVE_MAT_WIN_LOG */
1617
/* #define HAVE_MAT_STORAGE */
1718
/* #define HAVE_MAT_NETDETECT */
1819
#define HAVE_MAT_SHORT_NS

lib/include/mat/config-compact.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
/* #define HAVE_MAT_JSONHPP */
1414
/* #define HAVE_MAT_ZLIB */
1515
/* #define HAVE_MAT_LOGGING */
16+
/* #define HAVE_MAT_WIN_LOG */
1617
/* #define HAVE_MAT_STORAGE */
1718
/* #define HAVE_MAT_NETDETECT */
1819
#define HAVE_MAT_SHORT_NS

lib/include/mat/config-default-cs4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#define HAVE_MAT_JSONHPP
2424
#define HAVE_MAT_ZLIB
2525
#define HAVE_MAT_LOGGING
26+
/* #define HAVE_MAT_WIN_LOG */
2627
#define HAVE_MAT_STORAGE
2728
#define HAVE_MAT_DEFAULT_HTTP_CLIENT
2829
#define HAVE_MAT_LIVEEVENTINSPECTOR

lib/include/mat/config-default-exp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define HAVE_MAT_JSONHPP
2222
#define HAVE_MAT_ZLIB
2323
#define HAVE_MAT_LOGGING
24+
/* #define HAVE_MAT_WIN_LOG */
2425
#define HAVE_MAT_STORAGE
2526
#define HAVE_MAT_DEFAULT_HTTP_CLIENT
2627
#define HAVE_MAT_LIVEEVENTINSPECTOR

0 commit comments

Comments
 (0)