From 01dc9763f4ecedc01b9558f5190f116a345eb07a Mon Sep 17 00:00:00 2001 From: Woongsuk Cho Date: Mon, 25 Feb 2019 18:25:27 +0900 Subject: [PATCH] Add COMPlus_DebugWriteToStdErr=1 to environment. System.Diagnostics.Debug.WriteLine() function write logs to journalctl which cannot be accessed by 3rd party developer. To show that logs to dlogutil, add environment value "COMPlus_DebugWriteToStdErr=1". --- NativeLauncher/launcher/dotnet/dotnet_launcher.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index 920092c..2f946c9 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -294,6 +294,9 @@ int CoreRuntime::initialize(bool standalone) if (!standalone) putenv(const_cast("COMPlus_EnableDiagnostics=0")); + // Write Debug.WriteLine to stderr + putenv(const_cast("COMPlus_DebugWriteToStdErr=1")); + // read string from external file and set them to environment value. setEnvFromFile(); -- 2.7.4