Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Iguana stores its log messages in files contained in the Log Directory. To supplement the log directory structure, also read Logging and Queuing 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.

Expand
titleJournal file and individual queue log files per component

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

Expand
titleEach queue log directory is organized using hexadecimal integer representing the timestamp of the first log

Queue Log files are structured using a hexadecimal integer of the timestamp of the first log (in linux epoch time ). This allows IguanaX to efficiently track when each log file was created and its order in the queue- 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 Queue log files are generated in two cases, either when the:

  • Timestamp The log file size reaches 32 MB; Or

  • When the timestamp changes (about every 18 hours); Or The log file size reaches 32 MB

Info

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.