Time and Logging

Whenever I design a logging format, I'm filled with an overwhelming urge to make it timeless, in all
senses.  The passage of time, in the general sense, can be represented only by an unbounded integer,
which then immediately destroys any hopes of designing a format with all entries of a constant size.
Oft-times time is the one unbounded element of such a format, making handling it an important issue.

The easiest way to surpass this obstacle is through the removal of time from such a format.  While I
believe each and every high-level operation in a computer should have a timestamp, I also believe it
can be overkill in some situations.  Oft-times proper relative ordering of operations is sufficient;
from this can come time deltas, to give a sense of how much time has passed between such operations.
The single issue with time deltas is the need to insert synthetic operations if too much time passes
between events, which may be an acceptable trade-off.  Conversion between relative and absolute time
has linear time complexity, since all records must be examined, but this characteristic is inherent.

There exist computers which will never experience events causing them to misreport the current time.
They achieve this not by picking a large size of integer, but by transparently enlarging any integer
that passes the arbitrary threshold, and this remains the one true and proper answer to the problem.

To handle time as clocks do, by only storing modulo time, is that solution employed by most systems,
whether known to their designers or not.  A calendar nicely continues the analogy, and serves as the
unbounded component.  A clock is perfect for a critical system and sufficient for most of the casual
purposes, and a calendar is nowhere near as reliable but still more than reliable for most any need.

I'm led to believe the best way to solve this problem is to push it as high as possible in a system.
At the top-level, only a single unbounded integer would need consideration, and would easily get it.
That lowest logging mechanism needs only its relative or modulo time, and the higher system performs
all grouping as required; unbounded quantities invite exceptional situations, which must be avoided.

I look forward to watching the coming disaster in the year 2038, built by idiots for each one of us.