APIs for job logs

APIs for job logs

Below the APIs for job logs are listed. APIs are introduced here.

 

Get job log names

This returns a list of all the logger names that are used in the job log. These can be used as filter criteria when searching the job log.

GET <ng2_url>/restapi/v1/jobLogNames

 

Input: N/A

JSON example output:

{
  "names": [
    "FTP",
    "Multicast",
    "PCL",
    "PDF-Classic",
    "PDF_SIGN",
    "PrintManager",
    "SharePoint",
    "Template",
    "file"
  ]
}

 

Search job logs

This returns a number of job log records that match the search criteria. If no search parameters are specified, the last 50 entries in the job log are returned.

GET <ng2_url>/restapi/v1/jobLogs


Input, optional URL parameters:

  1.    maxResults: The maximum number of results to return. A larger number means longer processing time before the service returns a result.
  2.    status: A specific log status to search for. OK, WARNING and ERROR are allowed values.
  3.    name: A specific logger name (one of the values from the jobLogNames service).
  4.    filterText: A specific text to search for in the log text. All log entries containing this text (case insensitive) will be returned.
  5.    fromTime: The start time of the search in number of milliseconds since 01-01-1980. This is useful for paging through the log using the lastTimeStamp value in the response.
  6.    searchId: An id to assign to this search. It will be returned in the output.

Possible values in the output:

  1.    logId: Unique id for each log entry. This can be used to get additional lines of log information (see next service).
  2.    name: The name of the logger (one of the values from the jobLogNames service).
  3.    created: Time stamp for when the log message was created.
  4.    logStatus: The status of the action, either OK, WARNING or ERROR.
  5.    message: The primary log message.
  6.    key: An identifier for the job (this can be set in the workflow).
  7.    children: An array of log entries that are part of the same job.
  8.    lastResult: True if the last entry matching the search criteria is included in the output, otherwise false.
  9.    lastTimeStamp: The timestamp of the last entry in the output. This can be used to get the next page of logs by setting this value as fromTime on a new request (if lastResult was false).
  10.    searchId: A copy of the searchId from the input, or 0 if none was specified.

JSON example output:

{
  "logs": [
    {
      "logId": "fd4ea357-c436-44b8-8cee-599ce76fd850",
      "name": "Template",
      "created": "2021-07-02T10:43:47.562+0000",
      "logStatus": "ERROR",
      "worstChild": "ERROR"
    },
    {
      "logId": "d328c61e-209f-4456-97e3-6f99323d0df0",
      "name": "Template",
      "created": "2021-07-01T11:38:27.936+0000",
      "logStatus": "ERROR",
      "children": [
        {
          "logId": "bb123557-3829-423c-a30a-82343d74b833",
          "parentId": "d328c61e-209f-4456-97e3-6f99323d0df0",
          "name": "PDF-Classic",
          "created": "2021-07-01T11:38:29.176+0000",
          "logStatus": "OK",
          "message": "PDF rendering complete 1723324 bytes",
          "worstChild": "OK"
        }
      ],
      "worstChild": "ERROR"
    },
    {
      "logId": "61a87fdf-cd74-4c42-a302-1e0aeced6347",
      "name": "Template",
      "created": "2021-06-30T09:44:21.412+0000",
      "logStatus": "ERROR",
      "children": [
        {
          "logId": "d3c2e1ac-888d-4d98-8fb6-75a835d22957",
          "parentId": "61a87fdf-cd74-4c42-a302-1e0aeced6347",
          "name": "PDF-Classic",
          "created": "2021-06-30T09:44:21.804+0000",
          "logStatus": "OK",
          "message": "PDF rendering complete 1723328 bytes",
          "worstChild": "OK"
        }
      ],
      "worstChild": "ERROR"
    }
  ],
  "lastTimestamp": 1625046261412,
  "lastResult": false,
  "searchId": 0
}

 

Get log line details for a job log

This returns every message that was written to the log for a specific log id.

GET <ng2_url>/restapi/v1/jobLogs/<logId>


Input: <id> in the URL must be replaced with the id of the specific log entry (as seen in the list above).

 

Possible values in the Output:

  1.    id: Identifier for the line.
  2.    logId: The logId that was looked up.
  3.    message: The actual log line message or a translation key.
  4.    parameters: Parameter values for the log message (replacing placeholders in the translation text, if a key is used).
  5.    translated: The translated log line message.
  6.    level: The log level. One of TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
  7.    created: Time stamp for the log line.
  8.    keyValues: workflow variable values at the time the log line was created.
  9.    throwable: Stack trace in case of exception.

JSON example output:

{
  "logLines": [
    {
      "id": "17561",
      "logId": "fd4ea357-c436-44b8-8cee-599ce76fd850",
      "message": "template.001033: General error. java.awt.FontFormatException: Font not found: Courier",
      "translated": "template.001033: General error. java.awt.FontFormatException: Font not found: Courier",
      "level": "ERROR",
      "caller": "com.interform400.template.errorLog.TemplateErrorLogImpl.logError:22",
      "created": "2021-07-02T10:43:48.084+0000",
      "keyValues": {
        "NG2.TENANTID": "testing",
        "breadcrumbId": "ID-DESKTOP-TJT1IP8-1625221831447-0-81",
        "com.interform400.xml.Template": "preview_1625222627507.ift",
        "interformng.printerResolution": "300",
        "previewLogCode": "de374633-35a6-4bab-b1ff-fbf84a99800f"
      }
    },
    {
      "id": "17560",
      "logId": "fd4ea357-c436-44b8-8cee-599ce76fd850",
      "message": "template.001002: A referenced font is not found. Font not found: Courier",
      "translated": "template.001002: A referenced font is not found. Font not found: Courier",
      "level": "ERROR",
      "caller": "com.interform400.template.errorLog.TemplateErrorLogImpl.logError:22",
      "created": "2021-07-02T10:43:48.082+0000",
      "keyValues": {
        "NG2.TENANTID": "testing",
        "breadcrumbId": "ID-DESKTOP-TJT1IP8-1625221831447-0-81",
        "com.interform400.xml.Template": "preview_1625222627507.ift",
        "interformng.printerResolution": "300",
        "previewLogCode": "de374633-35a6-4bab-b1ff-fbf84a99800f"
      }
    },
    {
      "id": "17559",
      "logId": "fd4ea357-c436-44b8-8cee-599ce76fd850",
      "message": "workflow.used",
      "translated": "Workflow null used",
      "level": "INFO",
      "caller": "com.interform400.joblog.JobLoggerFactory.getInstance:111",
      "created": "2021-07-02T10:43:47.583+0000",
      "parameters": [
        "null"
      ]
    }
  ]
}
    • Related Articles

    • APIs

      Introduction The following describes the InterFormNG2 APIs. <NG2_URL> is used to denote the base URL of InterFormNG2, by default https://localhost:8086 Swagger documentation Swagger documentation for external API, authorization and webservice input ...
    • Job logs

      Whenever InterFormNG2 is processing a job a related job log is also created. The job log lists all details, outputs and possible errors/warnings concerning a specific input file. The details for the job logs are divided into these sections: Setup for ...
    • Logs

      In InterFormNG2 there are 8 types of logs: The job logs. This contains details information of what happened during processing of each input file. This can be used by non-technical users. A system log. The core log of InterFormNG2. This is advanced ...
    • Release log Version 1.x.x

      This is the list of the InterFormNG2 releases versions 1.x.x and the major new features in each release: Version 1.9.0 Version 1.8.0 Version 1.7.1 Version 1.7.0 Version 1.6.0 Version 1.5.4 Version 1.5.3 Version 1.5.2 Version 1.5.1 Version 1.5.0 ...
    • Release log Version 3.x.x

      This is the list of the InterFormNG2 releases versions 3.x.x and the major new features in each release: Version 3.5.1 Version 3.5.0 Version 3.4.3 Version 3.4.2 Version 3.4.1 Version 3.4.0 Version 3.3.2 Version 3.3.1 Version 3.3.0 Version 3.2.0 ...