Activating logging (pdfToolbox 10)

Purpose of logging feature

Especially in higher volume environments it can be of interest to have detailed information about the pdfToolbox processes as they happen. Suitable logging data can be a good foundation both for monitoring processing of PDF files as well as for post mortem analyses or analyses aiming to improve overall behavior of the whole processing system.

The logging feature that forms a part of pdfToolbox from version 10 onwards provides logging information in the form of JSON files that get written immediately at the following steps during an invocation of pdfToolbox:

  • When pdfToolbox is launched; only very basic data about the PDF file to be produced – such as file name  –  is available at this time, plus some information about the environment or the command line parameters
  • When pdfToolbox initiates processing of a PDF file; additional data about the PDF to be processed is provided – only aspects though that do not require no 'deeper' analysis in order not to hamper runtime behavior – such as file size or PDF version or size of the first page; in addition all variables – as evaluated at the beginning of processing – are included as well.
  • When pdfToolbox completes processing of a PDF file; at this stage various aspects of overview information is readily available, such as colors, fonts or ICC profiles used, output intents, conformance with PDF/X or other PDF standards.

Command line and Server versus Desktop

Logging is available in command line, Server and Desktop versions. It is not expected that logging on desktop is normally being used. Instead, on Desktop activating logging will help understand how logging works, and often makes it easier to design and test use of logging data outside of an automated production setup.

How to process logging data

Research has shown that most callas software customers who operate higher volume environments prefer any logging data to be provided rather as many small files using JSON over using other formats or a small number of large files. Beyond the way the logging data is provided, no assumptions are being made how these data are processed. 

Activating logging in command line version

New parameter:

--trace[=folderpath]

Example:

./pdfToolbox --trace='/some-logging-folder'  './some-pdftoolbox-profile.kfpx'   './input.pdf'  -o='./output.pdf'

Subfolder structure

By default the logging feature creates a subfolder structure inside the target folder for logging based on values for year, month and day, plus the app_uuid value (which can also be found inside each of the logging files):

 

YYYY
  MM
    DD
      app_uuid
        launch.json
        init.json
        finish.json
2016
  10
    31
      0a0ceba3-7ca9-421f-a973-8caae2950690
        launch.json
        init.json
        finish.json

Suppressing creation of subfolder structure

New parameter:

--trace_nosubfolders

Example:

./pdfToolbox --trace='/some-logging-folder'  --trace_nosubfolders './some-pdftoolbox-profile.kfpx'   './input.pdf'  -o='./output.pdf'

Activating logging in Server version

In the "pdfToolbox Server: Job" configuration window, add the following to the text field under "Additional CLI parameters":

--trace[=folderpath] 

Example:

--trace='/some-logging-folder' 

Suppressing creation of subfolder structure in Server version

In the "pdfToolbox Server: Job" configuration window, add the following to the text field under "Additional CLI parameters":

--trace[=folderpath] --trace_nosubfolders

Example:

--trace='/some-logging-folder'  --trace_nosubfolders

Important note: If logging is to be enabled for processing of all files in pdfToolbox Server, this setting must be added to each job configuration.

Activating logging in Desktop version

When "Log Profile Execution" (can be found in the menu in upper right of Profiles/Checks/Fixups window) is activated, then a sub folder "Additional logging" will be created if not already present, and inside that folder the logging files will be added in the same fashion / with the same naming conventions and sub-folder structure as for the CLI and Server version.

The JSON log files

There is an extensive article about the 3 JSON logging files, which will be created:

The JSON log files



0 Comments

Send Your Comment

E-Mail me when someone replies to this comment