[wix-users] Session.Log replacement of []

Nir Bar nir.bar at panel-sw.com
Mon Jun 28 08:04:15 PDT 2021


session.Log formats the message using MSI rules before dumping to the log file.

You can escape it like:

session.Log($"      ***** [\\[]{DateTime.Now}[\\]] {message}");





--

Nir Bar

WiX Expert








---- On Mon, 28 Jun 2021 14:49:45 +0300 Benny Bürger_via_wix-users
_ <wix-users at lists.wixtoolset.org> wrote ----



Hi, 
 
I have a custom action that is calling session.Log 
Because I want to know the exact time, I wrote an extension method: 
 
 internal static void LogWithTime(this Session session, string message) => session.Log($"      ***** [{DateTime.Now}] {message}"); 
 
Funny enough, after more than two years of usage I really needed to know the time: 
The output of each log was: "    ******   messageText". 
The text [DateTime...] has been replaced with a space. 
Is there some specific behaviour, that [] is replaced with something? 
 
Best regards, 
Benny 
 
____________________________________________________________________ 
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list