Transaction log is a sequential record of all Loqate processes invoked by the user.
This feature is enabled or disabled by default depending on the license agreement with the customer.
Logged Information
For each successful transaction, the following section below lists what information are being logged. A transaction is successful if at least 1 record is returned by the process.
- Time stamp
- List of Processes executed
- List of Reference data files used
- List of Checksums of data files used
- Country
- Address Verification Code
- GeoAccuracy
Each log entry can also be retrieved from lqtProcessResult output object through “Transaction.Log” field. The content of this field is formatted as follows:
<key>=<value>[:<key>=<value>]+
where,
<key> can be one of the following values:
– ts : time stamp
– tl : processes executed
– rd : reference data used
– cs : checksum of reference data
– co : country
– av : AVC
– ga : GeoAccuracy
<value> is the value of the corresponding key. Each key-value pair is separated by a colon.
File Name Convention and Automatic Backup
The transaction log file – trlog.lfs, is stored inside Loqate’s data installation folder. During application startup, this file is automatically created or opened for logging.
There is also an automatic backup mechanism and it can be triggered by the following 2 scenarios:
- Log file size exceeds 10MB, or
- New month is detected
Backup files are named using the following convention – trlogYYYYMMDDHHMMSS.lfs, where YYYYMMDDHHMMSS is the date and time when the original log file was created.
Custom Log Entries
Users can add a custom entry in the log by prefixing the input field name with “Transaction.Log.” The value in the field gets written to the log file. For example:
// Load the input record
rec->set(“Address1”, “PASEO DE LA CASTELLANA 137 MADRID 28001 Spain”);
rec->set(“Transaction.Log.User”, “Loqate”); // note the 2 periods in the prefix
// Process it
srv->process(rec, lst, res);
Above example would have the custom field “User” with value “Loqate” written to the log file.