Class: cWebAppLogReader
Properties | Events | Methods | Index of Classes
Reads web application logs created by WebAppServer.
Hierarchy
cObject > cWebAppLogReader
Show full hierarchy and direct subclasses
- cObject
- cWebAppLogReader
Library: Common Class Library
Package: cWebAppLogReader.pkg
Description
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.
Reading Log Files of a Register Web App
Log files can be opened from a registered web application using OpenWebAppLogFromRegisteredApp.
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.
Reading Log Files from a File
Log files can be opened from a file using OpenWebAppLogFromFile.
Log files opened from a file should not be registered in the Web Application Administrator. If a log file is opened via OpenWebAppLogFromFile, WebAppServer cannot access it.
Sample
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