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
is 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:
- OFF
- All traces are not logged.
- SEVERE
- Only severe errors are logged.
- WARNING
- The severe errors and warnings are logged.
- CONFIG
- All above and also the configuration information are logged.
- INFO
- All above and general information messages are logged.
- FINE
- All above and fine debugging messages are logged.
- FINER
- All above and finer debugging messages are logged.
- FINEST
- All above and finest debugging messages are logged.
- ALL
- 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:
- The
tracer.cfg
file is located in the same directory as theafp2pdf.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 FILE
Note: All keys and values intracer.cfg
are case-sensitive. - Copy the sample
tracer.cfg
file into thevar/afp2pdf
for AIX or Linux or theinstall_path\var\afp2pdf
for 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/afp2pdf
for AIX or Linux or theinstall_path\var\afp2pdf
for Windows. - On the next launch of the executable, the application will write the traces to the path configured in step 3.