We just had a situation where someone performed a deployment into the wrong system at the wrong time, yet nobody knows who did it, or when.
I looked in the Windows Event Logs on the target web server, and saw nothing that seemed to be from MSDEPLOY. Is there some kind of log? Even a log that just says, "a sync was performed at time by user"?
If there is no log, is there something I can do to force a log entry of some kind? For instance, is there a provider for writing event log entries, or one I can use to write to a file? I suppose I could run a script that would do some form of logging, but can the script be included in the package?
Sorry for all the questions, but this became a hot topic today!
Note that I want a log on the target web server. Either a log file, or an event log entry, but something for audit purposes that says "John deployed something at some time".
There's always -verbose
Verbose Specifies that the Informational verbosity level will be included in the output of the operation. By default, the verbosity levels of Warning, Error, and Fatal are included. The Informational verbosity level will return all messages that are triggered during an operation.
I'm not sure but -debug has also some effect in output
Note: In TFS builds using powershell extensions, I've been saving the output using this pattern:
I looked into this a while back and to the best of my knowledge MSDEPLOY doesn't log anything on the client side. All you can do it is redirect its output to a file -
Which of course is no good if someone is running this manually outside of an automated build and deploy tool.
You can log MSDEPLOY activity on the target server (if you're deploying using the Web Deploy service), but that's probably not so handy if you don't have complete RDP access to get at the logs.
I am guessing that MS see MSDEPLOY as just an ordinary tool much in the same way that that the C# compiler doesn't log something somewhere every time you compile your source.