Please enable JavaScript to view this site.

InterFormNG2 Manual

Navigation: Settings > APIs

APIs for job logs

Scroll Prev Top Next More

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:

 

   maxResults: The maximum number of results to return. A larger number means longer processing time before the service returns a result.

   status: A specific log status to search for. OK, WARNING and ERROR are allowed values.

   name: A specific logger name (one of the values from the jobLogNames service).

   filterText: A specific text to search for in the log text. All log entries containing this text (case insensitive) will be returned.

   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.

   searchId: An id to assign to this search. It will be returned in the output.

 

Possible values in the output:

 

   logId: Unique id for each log entry. This can be used to get additional lines of log information (see next service).

   name: The name of the logger (one of the values from the jobLogNames service).

   created: Time stamp for when the log message was created.

   logStatus: The status of the action, either OK, WARNING or ERROR.

   message: The primary log message.

   key: An identifier for the job (this can be set in the workflow).

   children: An array of log entries that are part of the same job.

   lastResult: True if the last entry matching the search criteria is included in the output, otherwise false.

   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).

   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:

 

   id: Identifier for the line.

   logId: The logId that was looked up.

   message: The actual log line message or a translation key.

   parameters: Parameter values for the log message (replacing placeholders in the translation text, if a key is used).

   translated: The translated log line message.

   level: The log level. One of TRACE, DEBUG, INFO, WARN, ERROR, FATAL.

   created: Time stamp for the log line.

   keyValues: workflow variable values at the time the log line was created.

   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"

           ]

       }

   ]

}