1.2 KiB
1.2 KiB
Helpful info for Event Viewer logging
This C++ project logs to the Windows Event Viewer. It's all wired up to be called from Rust just the same as our RPC code. If you want to test changes here:
- Make sure to go change the
resourceFileName
and themessageFileName
ininstrumentation.man
to point at where the files are in your build directory. (For me, that wasD:\dev\private\sudo\target\x86_64-pc-windows-msvc\debug\sudo.exe
). It needs to be the full path, so Event Viewer can find the exe (to load the resources from it to know how to format the packet of binary data written to it)- Make sure to change it back to
%systemroot%\System32\sudo.exe
before you push!
- Make sure to change it back to
- Make sure that Event Viewer is closed, and do
to remove the old manifest from event viewerwevtutil um cpp\logging\instrumentation.man
- Build the project
- Do a
to install the new manifest to event viewerwevtutil im cpp\logging\instrumentation.man
- Open event viewer, and navigate to "Applications and Services Logs" ->
"Microsoft" -> "Windows" -> "Sudo" -> "Admin"
- alternatively:
wevtutil qe Microsoft-Windows-Sudo/Admin /c:3 /rd:true /f:text
- alternatively: