Log Directory Structure

Iguana stores its log messages in files contained in the Log Directory. To supplement the log directory structure, also read The Logging System.

The log directory uses a hierarchal directory structure to ensure efficient storage, retrieval and management of log data across all components in the Iguana instance.

It is made up of a journal file and individual log files for the Iguana Service and each individual component.

Log files are structured using a hexadecimal integer of the timestamp of the first log (in linux epoch time - the number of seconds since January 1st 1970). The structure of logs is design to facilitate fast random access to the data and makes it quick to search the logs and dequeue data.

0000000066D9B615 (Hexadecimal) → 1725543957 (Decimal) → Thursday, September 5, 2024 1:45:57 PM (Linux Epoch Time)

New log files within these log files are generated in two cases, either when the:

  • The log file size reaches 32 MB; Or

  • When the timestamp changes (about every 18 hours)

Why every ~18 hours? When the timestamp of the message changes, it must be written to a file in a different directory. This is because the timestamps are organized by hexadecimal ranges.

For example, files in 00000000/66/D9/ can only store messages generated between 66D90000 and 66D9FFFF.

This range corresponds to: 0000FFFF → 65535 seconds → ~18.2 hours. After this period, log files must be stored in a new directory.

Â