The cWebAppLogReader class can read web application logs created by WebAppServer.
WebAppServer maintains log files for your application. These log files are stored in a binary format. The cWebAppLogReader class can read these files and enables you to use the information in your application.
Log files can be opened from a registered web application using OpenWebAppLogFromRegisteredApp or from a file using OpenWebAppLogFromFile.
Web applications registered in the Web Application Administrator do not have to be running to read them, only registered. cWebAppLogReader and WebAppServer can simultaneously use the log file, but the WebAppServer has to be running.
Log files opened from a file should not be registered in the Web Application Administrator. If a log file is opened by cWebAppLogReader, WebAppServer cannot access it.
This sample shows how to read a complete web app log into a tWebAppLogEntry array. In this sample, the name of the web app is passed to the sample procedure in String sWebApp.
Object oLogReader is a cWebAppLogReader End_Object // in a cWebButton or other interface Procedure DisplayLogFromWebApp String sWebApp Boolean bOk tWebAppLogEntry TheLog Get OpenWebAppLogFromRunningApp of oLogReader sWebApp to bOk If (bOk) Begin Get ReadEntireLog of oLogReader to TheLog Send CloseWebAppLog of oLogReader End Else Begin Send ClearData of oLogGrid End End_Procedure