Add COMPlus_DebugWriteToStdErr=1 to environment.
authorWoongsuk Cho <ws77.cho@samsung.com>
Mon, 25 Feb 2019 09:25:27 +0000 (18:25 +0900)
committer조웅석/Common Platform Lab(SR)/Staff Engineer/삼성전자 <ws77.cho@samsung.com>
Thu, 28 Feb 2019 00:47:46 +0000 (09:47 +0900)
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

index 920092c..2f946c9 100644 (file)
@@ -294,6 +294,9 @@ int CoreRuntime::initialize(bool standalone)
        if (!standalone)
                putenv(const_cast<char *>("COMPlus_EnableDiagnostics=0"));
 
+       // Write Debug.WriteLine to stderr
+       putenv(const_cast<char *>("COMPlus_DebugWriteToStdErr=1"));
+
        // read string from external file and set them to environment value.
        setEnvFromFile();