This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19
Description of log files
|
Field name | Description |
sequence_number | Unique and sequential operation number in the logging session |
time | Date and time using ISO 8601 format: 'YYYY-MM-DDTHH:MM:SS.mmm' |
systemid | System ID |
component | Component signature (e.g., '4SQLS' or 'dbmg') |
process_info_index | Corresponds to the "index" field in 4DRequestsLog_ProcessInfo.txt log, and permits linking a request to a process. |
request | Request ID in C/S or message string for SQL requests or LOG EVENT messages |
bytes_in | Number of bytes received |
bytes_out | Number of bytes sent |
server_duration | exec_duration | Depends on where the log is generated:
|
write_duration | Time taken in microseconds for sending the:
|
task_kind | Preemptive or cooperative (respectively 'p' or 'c') |
rtt | Time estimate in microseconds for the client to send the request and the server to acknowledge it. A to D and E to H in image below.
|
Request flow:
This log file records information on each process created on the 4D Server machine or the 4D remote machine that executed the command (excluding Web requests).
How to start this log:
SET DATABASE PARAMETER(4D Server log recording;1) //server side
SET DATABASE PARAMETER(Client Log Recording;1) //remote side
Note: This statement also starts the 4DRequestsLog.txt log file (see above).
Headers
This file starts with the following headers:
Contents
For each process, the following fields are logged:
Field name | Description |
sequence_number | Unique and sequential operation number in the logging session |
time | Date and time using ISO 8601 format: "YYYY-MM-DDTHH:MM:SS.mmm" |
process_info_index | Unique and sequential process number |
CDB4DBaseContext | DB4D component database context UUID |
systemid | System ID |
server_process_id | Process ID on Server |
remote_process_id | Process ID on Client |
process_name | Process name |
cID | Identifier of 4D Connection |
uID | Identifier of 4D Client |
IP | Client IPv4/IPv6 address |
host_name | Client hostname |
user_name | User Login Name on client |
connection_uuid | UUID identifier of process connection |
server_process_unique_id | Unique process ID on Server |
This log file records each HTTP request and each response in raw mode. Whole requests, including headers, are logged; optionally, body parts can be logged as well.
How to start this log:
WEB SET OPTION(Web debug log;wdl enable without body) //other values are available
The following fields are logged for both Request and Response:
Field name | Description |
SocketID | ID of socket used for communication |
PeerIP | IPv4 address of host (client) |
PeerPort | Port used by host (client) |
TimeStamp | Timestamp in milliseconds (since system startup) |
ConnectionID | Connection UUID (UUID of VTCPSocket used for communication) |
SequenceNumber | Unique and sequential operation number in the logging session |
This log file records each event occurring at the 4D programming level. Standard mode provides a basic view of events.
How to start this log:
SET DATABASE PARAMETER(Debug Log Recording;2) //standard, all processes
SET DATABASE PARAMETER(Current process debug log recording;2) //standard, current process only
The following fields are logged for each event:
Column # | Description |
1 | Unique and sequential operation number in the logging session |
2 | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) |
3 | Process ID (p=xx) and unique process ID (puid=xx) |
4 | Stack level |
5 | Can be Command Name/ Method Name/Message/ Task Start Stop info/Plugin Name, event or Callback/Connection UUID |
6 | Time taken for logging operation in milliseconds |
This log file records each event occurring at the 4D programming level in a tabbed, compact format that includes additional information (compared to the standard format).
How to start this log:
SET DATABASE PARAMETER(Debug Log Recording;2+4) //extended tabbed format, all processes
SET DATABASE PARAMETER(Current process debug log recording;2+4) //extended, current process only
The following fields are logged for each event:
Column # | Field name | Description | |||||||||||||
1 | sequence_number | Unique and sequential operation number in the logging session | |||||||||||||
2 | time | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) | |||||||||||||
3 | processID | Process ID | |||||||||||||
4 | unique_processID | Unique process ID | |||||||||||||
5 | stack_level | Stack level | |||||||||||||
6 | operation_type | Log operation type. This value may be an absolute value:
| |||||||||||||
7 | operation | May represent (depending on operation type): | |||||||||||||
8 | operation_parameters | Parameters passed to commands, methods, or plugins | |||||||||||||
9 | form_event | Form event if any; empty in other cases (suppose that column is used when code is executed in a form method or object method) | |||||||||||||
10 | stack_opening_sequence_number | Only for the closing stack levels: Sequence number of the corresponding opening stack level | |||||||||||||
11 | stack_level_execution_time | Only for the closing stack levels: Elapsed time in micro seconds of the current logged action (see last columns in lines 123 and 124 in the log above) |
This log file records many events related to the internal application operation and is human-readable. You can include custom information in this file using the LOG EVENT command.
How to start this log:
SET DATABASE PARAMETER(Diagnostic log recording;1) //start recording
The following fields are logged for each event:
Fields name | Description |
sequenceNumber | Unique and sequential operation number in the logging session |
timestamp | Date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ss.mmm) |
loggerID | Optional |
componentSignature | Optional - internal component signature |
messageLevel | Info, Warning, Error |
message | Description of the log entry |
Depending on the event, various other fields can also be logged, such as task, socket, etc.
These log files record each exchange between the 4D application and the mail server (SMTP, POP3, IMAP) that has been initiated by the following commands:
The log files can be produced in two versions:
To start this log:
SET DATABASE PARAMETER(SMTP Log;1) //start SMTP log OR
SET DATABASE PARAMETER(POP3 Log;1) //start POP3 log OR
SET DATABASE PARAMETER(IMAP Log;1) //start IMAP log
To start this log:
$server:=New object
...
//SMTP
$server.logFile:="MySMTPAuthLog.txt"
$transporter:=SMTP New transporter($server)
// POP3
$server.logFile:="MyPOP3AuthLog.txt"
$transporter:=POP3 New transporter($server)
//IMAP
$server.logFile:="MyIMAPAuthLog.txt"
$transporter:=IMAP New transporter($server)
Contents
For each request, the following fields are logged:
Column # | Description |
1 | Unique and sequential operation number in the logging session |
2 | Date and time in RFC3339 format (yyyy-mm-ddThh:mm:ss.ms) |
3 | 4D Process ID |
4 | Unique process ID |
5 |
|
This log records each ORDA request sent from a remote machine. You can direct log information to memory or to a file on disk. The name and location of this log file are your choice.
How to start this log:
//to be executed on a remote machine
ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) //can be also sent to memory
Note: If you want to use the unique sequence number in ORDA request log, you need to trigger it:
//to be executed on a remote machine
SET DATABASE PARAMETER(Client Log Recording;1) //to enable log sequence number
ds.startRequestLog(File("/PACKAGE/Logs/ordaLog.txt")) //can be also sent to memory
SET DATABASE PARAMETER(Client Log Recording;0) //disabling sequence number
The following fields are logged for each request:
Field name | Description | Example |
sequenceNumber | Unique and sequential operation number in the logging session | 104 |
url | Client ORDA request URL | "rest/Persons(30001)" |
startTime | Starting date and time using ISO 8601 format | "2019-05-28T08:25:12.346Z" |
endTime | Ending date and time using ISO 8601 format | "2019-05-28T08:25:12.371Z" |
duration | Client processing duration (ms) | 25 |
response | Server response object | {"status":200,"body":{"__entityModel":"Persons",[...] |
Product: 4D
Theme: Debug log files
Modified: 4D v17 R5
Modified: 4D v17 R6
Modified: 4D v18 R2
Modified: 4D v18 R3
Modified: 4D v19
4D Design Reference ( 4D v19)