I’m writing a plugin. When I use EnvironmentManager.Log( ), where are the logs located? I see nothing in the Event Logs, and the only files I have found are at [C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Smart Client\Exceptions and they contain exceptions only, but nothing I have logged.
I think the issue is that Smart Client logging per default is not enabled. See https://force.milestonesys.com/support/articles/en_US/How_To/Enable-XProtect-Smart-Client-logging-automatically-and-manually
Thanks, Bo. That’s just what I was looking for.
While we are on the subject of logging, there is an override of EnvironmentManager.Log that takes an array of objects for its last parameter. I assumed that those were formatting parameters that would get substituted into the “text” parameter if there were placeholders. But that didn’t happen when I tried it (I used a C#-style format string with placeholders like {0}). So what is that object array for?
I can see how this does not work as expected.
-note however that the code -
- EnvironmentManager.Instance.Log(true, “Wherever”, "my debug {0} text ", new object[] { “first text”, “second text”, “third text” });
gives in the MIP log
- DEBUG - Error: Wherever(): my debug {0} text , first text, second text, third text
-note how the three objects added here are actually written to the log.
I guees that answers what the object array is for.