This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
dataStore.startRequestLog( )
|
dataStore.startRequestLog ( {file | reqNum} ) | ||||||||
Parameter | Type | Description | ||||||
file | reqNum | Object, Longint |
![]() |
File object or Number of requests to keep in memory |
|||||
The dataStore.startRequestLog( ) method starts the logging of ORDA requests on the client side.
This method must be called on a remote 4D, otherwise it does nothing. It is designed for debugging purposes in client/server configurations.
The ORDA request log can be sent to a file or to memory, depending on the parameter passed to the method:
For a description of the ORDA request log format, please refer to the ORDA client requests section.
You want to log ORDA client requests in a file and use the log sequence number:
C_OBJECT($e;$file)
$file:=File("/LOGS/ORDARequests.txt") //logs folder
SET DATABASE PARAMETER(Client Log Recording;1) //to trigger the global log sequence number
ds.startRequestLog($file)
$e:=ds.Persons.get(30001) //send a request
ds.stopRequestLog()
SET DATABASE PARAMETER(Client Log Recording;0)
You want to log ORDA client requests in memory:
C_OBJECT($es)
C_COLLECTION($log)
ds.startRequestLog(3) //keep 3 requests in memory
$es:=ds.Persons.query("name=:1";"Marie")
$es:=ds.Persons.query("name IN :1";New collection("Marie"))
$es:=ds.Persons.query("name=:1";"So@")
$log:=ds.getRequestLog()
ALERT("The longest request lasted: "+String($log.max("duration"))+" ms")
Product: 4D
Theme: ORDA - DataStore
Created: 4D v17 R6
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)