StartLogging()
|
Previous Top Next |
:StartLogging([<cLogFileName>]) --> lLogStatus
|
<cLogFileName>
|
<cLogFileName> optionally specifies the (new) File Name of the Log File. The default value is the current Log File Name, which is stored in the ReadOnly instance variable :LogFile.
|
This method returns the current Logging Status: .T. (TRUE) if Logging was successfully enabled or .F. (FALSE) if logging could not be enabled, and is therefore (still) disabled.
|
Starts and Enables Logging to the current Log File, and optionally sets a (new) Log File Name. If a Log File is already open, it will first be closed, and logging is continued to/in the new Log File.
|
|
If the Log File could not be created or opened, logging is not enabled, and the method returns .F. (FALSE), otherwise .T. (TRUE) is returned.
|
Create a new XbZLibZip object, and start Logging to Log File "MyArchive.log". Then open an existing Zip File named "MyArchive.zip" in Test mode, which will log the complete test and its result, and then close the Zip File and the Log File. This example code does the exact same as the :SetLogFile() example code:
|
oZip := XbZLibZip():New()
|
oZip:StartLogging("MyArchive.log")
|
oZip:Open('MyArchive.zip', XBZ_OPEN_TEST)
|
oZip:Close()
|