Skip to content

Logging & shared operation ​

Create a writable log directory and select it explicitly when desired:

sh
mkdir -p logs
bin/Linux-x86_64/qtalh -l logs -a alarm.log -o operation.log -m 2000 -L my.alhConfig

Replace my.alhConfig with your configuration. Without -L, alarm logs retain the most recent 2000 records by default using a circular file. With -L, they append without a record limit, matching ALH. An explicit -m overrides either default; the example above opts into 2000 records. Physical line order after wrapping is not chronological. Operation logs append without a record limit. Their facility prefix uses the root group's alias, or its name if no alias is set, and follows alias changes on reload. Database headers retain the underlying facility identifier. Dated logs route each alarm by its event's local date, so delayed alarms crossing midnight remain searchable on their original date. Operation logs use the current date. Earlier daily files are kept; automatic deletion is not implemented. Historical browsers search the current file and dated siblings, sort by time, and support local From/To times and case-sensitive With text across complete records, including legacy continuation lines. For circular logs, a checkpoint matching the complete file preserves insertion order among equal timestamps, including when results are limited. Without a matching checkpoint, equal timestamps retain physical file order. They report cancellation, unreadable files, and the 100,000-record/10 MiB result limits. Live viewers and the ten-entry in-memory alarm history are separate.

Runtime errors are appended to the operation log when logging is enabled and the destination is writable. Failure to audit an error still leaves it visible in the message area and diagnostic output without recursively logging failures.

Startup log-open failures appear in the message area and error dialog (unless -noerrorpopup is set). Failed destinations are retried on subsequent records and every two seconds; repeated identical open errors are reported once. Recovery preserves the other log and resumes recording new events. Events missed while a destination was unavailable are not replayed.

View → Alarm Log File and Operation Log File show a live tail limited to 1,000 records or 256 KiB. They follow destination changes and the current local date with -T. File reads run in the background; unchanged append-only files are not reread in full. The alarm viewer uses a valid checkpoint to display wrapped records in insertion order, including equal timestamps. Without a matching checkpoint, a snapshot scans all physical slots and retains the newest timestamps before applying the display limits. Equal timestamps retain physical order. Use the historical browser for older records.

Bounded alarm logs keep a sibling .qtalh-position.<identity> file containing two binary checkpoints. The identity suffix keeps a renamed log and its replacement from sharing a checkpoint. A locator stored on the log preserves checkpoint lookup across renames on filesystems supporting extended attributes or NTFS streams; keep the checkpoint at that location. Existing .qtalh-position files remain readable and are upgraded on the next write. If it is missing or does not match, recovery uses timestamps, which cannot reliably order ties or out-of-order records. Records are flushed before checkpoint updates; the two files are separate writes and are not an atomic transaction or a per-record durable fsync. New alarms arriving during a large recovery scan are spooled in order. If the snapshot changes or cannot be read, recovery retries without consuming the pending alarm. An unreadable or incomplete spool is also retained, with a diagnostic identifying its path and first unread byte; only fully consumed spools are removed. Closing a window makes a bounded synchronous retry; if recovery still fails, a diagnostic identifies the retained temporary spool, the first unread byte, and its target log. This spool requires manual recovery: from that byte, each entry is an 8-byte header (two big-endian unsigned 32-bit values: retention limit and record byte length) followed by the record bytes. See the checkpoint details.

-L uses <configuration>.LOCK by default and checks ownership at startup and about every 20 seconds. It selects the alarm writer; operation records remain per-process. Multiple independent processes sharing a circular alarm file should use the same lock basename and logging settings. -Lfile /path/to/shared selects /path/to/shared.LOCK. On Linux/macOS, locks use the legacy POSIX format; Windows uses native file locks without POSIX interoperability.

-B uses <configuration>.MESS and .MESSLOCK, independently of -Lfile. Participants must use the same configuration identity and have access to those files. Pending startup messages and reload requests are delivered after the window installs its handlers. Messages are polled every two seconds, and senders hold delivery ownership for 60 seconds; another send reports busy during that interval. Broadcast actions send a message, reload the named configuration, or suppress alarm logging and commands for 1–10 minutes. Monitoring continues. Reload preserves Silence Forever.