Logging service for a visual studio C# custom action
To help isolate problems that may occur when users try to use my installer, I have decided to开发者_高级运维 log installation progress, states, errors, and warnings in a log file from my custom actions. However, none of the popular logging packages seem to be viable since they require configuration of the calling assembly (log4net for example). And I have also read that you cannot do MSI logging through Installer classes after trying and failing. For now I can simply resort to basic file operations to log the information. Is this what most people do who write custom actions with logs, or is there a another way I have not considered?
I like the Windows Event Log myself.
System.Diagnostics.EventLog
In the end, my installer ended up needing an external ui handler. This caused me to switch from setup & deployment to wix/votive for my MSI needs. As a result the DTF custom actions were able to use MSI logging.
精彩评论