EnableLog Method (logModes, logFile)

DTF API

Copy image CopyHover image
Deployment Tools Foundation EnableLog Method (logModes, logFile)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerEnableLog(InstallLogModes, String)
Enables logging of the selected message type for all subsequent install sessions in the current process space.
Declaration Syntax
C# Visual Basic Visual C++ F#
public static void EnableLog(
	InstallLogModes logModes,
	string logFile
)
Public Shared Sub EnableLog ( 
	logModes As InstallLogModes,
	logFile As String
)
public:
static void EnableLog(
	InstallLogModes logModes, 
	String^ logFile
)
static member EnableLog : 
        logModes : InstallLogModes * 
        logFile : string -> unit 
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.
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.
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.11.1.2318)