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:

 

   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"

           ]

       }

   ]

}

    • Related Articles

    • 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: 1.Setup ...
    • 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 ...
    • Logs

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

      Below you see a list of the APIs for printers in InterFormNG2. APIs are introduced here. List system printer names This returns a list with the names of all printers that are installed on the O/S on the InterFormNG2 host machine. GET ...
    • Adding new job records in a database

      Adding new job records in a database New job records can be added to the database table by inserting rows in the "job" table. For new jobs, the following columns are used: Column Type Mandatory Value Description processed Integer Yes 0 Indicates ...