Get Log
Source: OCPP 1.6 Security Whitepaper Edition 2 (2020-03-31) — Use Case N01 (Retrieve Log Information), Sections 5.9 / 5.10 (Messages)
Overview
The Central System can request a Charge Point to upload a log file (security log or diagnostics log) to a given location. The format of the log file is not prescribed.
Flow:
- Central System sends
GetLog.reqto the Charge Point with the log type, request id, target URL and optional retry parameters. - The Charge Point responds with
GetLog.confindicating whether it can accept the request and the file name that will be uploaded. - The Charge Point sends
LogStatusNotification.req(status = Uploading, requestId). - The Charge Point uploads the log file to the URL provided in
log.remoteLocation. - The Charge Point sends
LogStatusNotification.req(status = Uploaded, requestId)(or a failure status).
If the Charge Point is already uploading a log when a new GetLog.req arrives, it SHOULD cancel the ongoing upload and respond with AcceptedCanceled.
It is RECOMMENDED to upload via FTP or FTPS, which support resume on partial uploads. The CP advertises which protocols it supports via the SupportedFileTransferProtocols configuration key.
Sequence Diagram
Figure 12. Sequence Diagram: Get Security Log
Central System ──── GetLog.req ────▶ Charge Point
(logType, requestId, log{remoteLocation, ...}, retries?, retryInterval?)
Central System ◀─── GetLog.conf ──── Charge Point
(status, filename?)
◀─── LogStatusNotification.req (Uploading)
──── LogStatusNotification.conf ────▶
(...uploading log file...)
◀─── LogStatusNotification.req (Uploaded)
──── LogStatusNotification.conf ────▶
Initiator
Central System → Charge Point
Fields
| Field Name | Field Type | Card. | Description |
|---|---|---|---|
| logType | LogEnumType | 1..1 | Required. This contains the type of log file that the Charge Point should send. |
| requestId | integer | 1..1 | Required. The id of this request. |
| retries | integer | 0..1 | Optional. How many times the Charge Point must try to upload the log before giving up. |
| retryInterval | integer | 0..1 | Optional. The interval in seconds after which a retry may be attempted. |
| log | LogParametersType | 1..1 | Required. This field specifies the requested log and the location to which the log should be sent. |
| Field Name | Field Type | Card. | Description |
|---|---|---|---|
| status | LogStatusEnumType | 1..1 | Required. Indicates whether the Charge Point was able to accept the request. |
| filename | string [0..255] | 0..1 | Optional. Contains the name of the log file that will be uploaded. Not present when no logging information is available. |
LogParametersType
| Field | Type | Card. | Description |
|---|---|---|---|
| remoteLocation | string [0..512] | 1..1 | Required. The URL of the location at the remote system where the log should be stored. |
| oldestTimestamp | dateTime | 0..1 | Optional. Date and time of the oldest logging information to include. |
| latestTimestamp | dateTime | 0..1 | Optional. Date and time of the latest logging information to include. |
LogEnumType values
DiagnosticsLog— Diagnostics log file.SecurityLog— Security log file.
LogStatusEnumType values
Accepted— Accepted this log upload. CP will start the log file upload.Rejected— Log upload request rejected.AcceptedCanceled— Accepted, but in doing so canceled an ongoing log file upload.
Examples
{
"logType": "SecurityLog",
"requestId": 123,
"retries": 3,
"retryInterval": 60,
"log": {
"remoteLocation": "ftps://logs-user:secret@logs.example.com/uploads/",
"oldestTimestamp": "2026-04-25T00:00:00Z",
"latestTimestamp": "2026-04-27T12:00:00Z"
}
}{
"status": "Accepted",
"filename": "security-log-CP-2026-000123-2026-04-27.log"
}Related Configuration Keys
SupportedFileTransferProtocols— File transfer protocols supported by the CP.
Schema
Source:
schemas/GetLog.json,schemas/GetLogResponse.json(OCPP 1.6 Security Whitepaper, JSON Schema draft-06)