Deployment Tools Foundation
EnableLog Method (logModes, logFile, append, flushEveryLine)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Installer ► EnableLog(InstallLogModes, String, Boolean, Boolean)
Enables logging of the selected message type for all subsequent install sessions in
the current process space.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static void EnableLog( InstallLogModes logModes, string logFile, bool append, bool flushEveryLine )
Public Shared Sub EnableLog ( logModes As InstallLogModes, logFile As String, append As Boolean, flushEveryLine As Boolean )
public: static void EnableLog( InstallLogModes logModes, String^ logFile, bool append, bool flushEveryLine )
Parameters
- logModes (InstallLogModes)
- One or more mode flags specifying the type of messages to log
- logFile (String)
- Full path to the log file. A null path disables logging, in which case the logModes paraneter is ignored.
- append (Boolean)
- If true, the log lines will be appended to any existing file content. If false, the log file will be truncated if it exists. The default is false.
- flushEveryLine (Boolean)
- If true, the log will be flushed after every line. If false, the log will be flushed every 20 lines. The default is true.
Remarks
This method takes effect on any new installation processes. Calling this method from within a custom action will not start logging for that installation.
Win32 MSI API: MsiEnableLog
Exceptions
Exception | Condition |
---|---|
ArgumentException | an invalid log mode was specified |
Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.9.1006.0)