Using the afp2pdf tracing and logging facility
Parameters to control settings for the tracing and logging facility of afp2pdf transform are specified in a configuration file. By default, the name of the file
tracer.cfg. The tracing facility can provide a large amount of information about how the transform
performed the operations and also how the code was run.
The new tracing/logging facility uses a hierarchical model with nine levels of details:
- All traces are not logged.
- Only severe errors are logged.
- The severe errors and warnings are logged.
- All above and also the configuration information are logged.
- All above and general information messages are logged.
- All above and fine debugging messages are logged.
- All above and finer debugging messages are logged.
- All above and finest debugging messages are logged.
- All messages are logged.
By default, all traces are off and no messages are logged in the trace file. To start the tracer/logger, follow these steps:
tracer.cfgfile is located in the same directory as the
afp2pdf.exe, and it looks like this:
; BEGIN OF TRACER.CFG FILE ; ; This file is used for configuring the tracer. ; ; ALL KEYS AND VALUES FROM THIS FILE ARE CASE SENSITIVE!!! ; ; Key name: TRACE-LEVEL ; Possible values: OFF,SEVERE,WARNING,CONFIG,INFO,FINE,FINER,FINEST,ALL ; Default value: OFF ; Description: Set the level of details that are recorded by the ; tracer. The order of the values is also the level ; of visibility. For example: if the tracer is set ; to level CONFIG, all levels prior to this level ; are recorded (SEVERE, WARNING and CONFIG). ; OFF is to shutdown the trace completely ; ALL is the most detailed level of tracing TRACE-LEVEL = INFO ; Key name: TRACE-PATH ; Possible values: A valid location on the disk. If empty then the ; trace will use the current working directory. ; Default value: ; Description: Specifies where the log files are going to be ; created. TRACE-PATH = ; Key name: TRACE-FILENAME ; Possible values: A filename that contains the %d or %u inside ; of it. ; Default value: trace%d.log ; Description: This is used as template for creating the trace ; filename. The %d or %u is used to specify the ; current number of the trace. TRACE-FILENAME = trace%d.log ; Key name: MAX-BACKUP-TRACE ; Possible values: A positive number ; Default value: 3 ; Description: This field specifies how many backups of the ; trace should be kept on the disk before ; start deleting them. MAX-BACKUP-TRACE = 3 ; Key name: TRACE-MAX-SIZE ; Possible values: A positive number for the size of the trace ; file in bytes. ; Default value: 5242880 ~ 5Mb ; Description: This field specifies how big the trace file ; should be before wrapping the file. TRACE-MAX-SIZE = 5242880 ; Key name: OUTPUT-TO-STDERR ; Possible values: YES,NO ; Default value: NO ; Description: This field tells if the trace messages should ; be sent to standard error or not. This parameter ; can be combined with OUTPUT-TO-STDOUT and ; OUTPUT-TO-FILE for writing to multiple locations. OUTPUT-TO-STDERR = NO ; Key name: OUTPUT-TO-STDOUT ; Possible values: YES,NO ; Default value: NO ; Description: This field tells if the trace messages should be ; sent to standard output or ; not OUTPUT-TO-STDOUT = NO ; Key name: OUTPUT-TO-FILE ; Possible values: YES,NO ; Default value: YES ; Description: This field tells if the trace messages should be ; sent to the trace file or not OUTPUT-TO-FILE = NO ; END OF TRACER.CFG FILENote: All keys and values in
- Copy the sample
tracer.cfgfile into the
var/afp2pdffor AIX or Linux or the
install_path\var\afp2pdffor Windows directory.
- Configure the parameter OUTPUT-TO-FILE to YES. And specify the location where the trace files should be created by configuring
the parameter TRACE-PATH to
var/afp2pdffor AIX or Linux or the
- On the next launch of the executable, the application will write the traces to the path configured in step 3.