LogFile Property  

Gets and sets the name of the server log file.


object.LogFile [ = filename ]


The LogFile property is used to specify the name of a file that will contain a log of all client activity. The LogFormat and LogLevel properties affect the specific format for the file and the level of detail included in the log. It is recommended that you specify an absolute path to the log file, otherwise the path will be relative to the current working directory. You may include environment variables in the path surrounded by percent (%) symbols and they will be expanded.

If the log file does not exist it will be created when the server is started. If file already exists, the server will append the new logging data to the file. The server must have permission to create and/or modify the specified file.

Setting this property to an empty string after the server has been started will have the effect of disabling logging, setting the logging level to 0 and the logging format to httpLogNone.

Data Type



' Enable server logging
HttpServer1.LogFile = "%ALLUSERSPROFILE%\MyProgram\WebServer.log"
HttpServer1.LogFormat = httpLogCombined
HttpServer1.LogLevel = 5

See Also

LogFormat Property, LogLevel Property