StateLog is a logger that uses a compact JSON data representation for applications requiring periodic logging. StateLog instances only grow when state changes.
Discrete Time Axis
StateLog relies on an infinite discrete time axis to log periodic events separated by a client-defined interval. The client must therefore provide exactly one state update for each interval. Logged states increases in age until they change. State change is determined by a Merkle tree hash. The default state is undefined.
Syncronization
Synchronization of updates is a responsibility shared between client and StateLog. The client is responsible for periodic logging--StateLog is NOT designed for intermittent ad-hoc logging. Although periodic logging is required, strict adherence to discrete time points is not required. StateLog will deduce the discrete time point correspoinding to each update. Clients should therefore be aware that the time of any logged event is recorded at the granularity of the logging interval, not the actual time of the event. Updates made at the beginning of an interval will have the same discrete timestamp as updates made at the end of an interval.
Because discrete time points are used for logging, StateLog will handle delayed logging provided the delay does not exceed a full interval.
Finally, if logging is interrupted for more than an interval, Statelog will automatically an undefined state for the duration of the logging gap as soon as the next update arrives.