#set TITLE = "transaction logs and error logs"
#include top

.SH Transaction logs 
A log containing entries for each database transaction is maintained.
The name of this file is \fClogs/dbtranslog\fR.
The format of the transaction log is:
.LP
\fCfilename  op  user  yy/mm/dd  hh:mm:ss  field1 .. fieldn\fR
.IP
\fBfilename\fR is the data file that was updated.
.IP
\fBop\fR describes what was done and may be one of:
.RS
.IP
add = new record appended to file
.br
update_old = single record update.. previous contents
.br
update_new = single record update.. new contents
.br
delete = single record deletion.. tracked in subsequent pair of replace records
.RE
.IP
\fBuser\fR is the identity of the user, which can be set using
#set FILE = "identity.html"
#set TAG = "IDENTITY."
#include link
If no identity has been set, this field will be an equals-sign.
.IP
\fBdate\fR and \fBtime\fR indicate when the transaction occurred
.IP
Finally, all data fields on the affected record are present.
.LP
No concurrency control is maintained on the transaction log file; simultaneous
updates may result in scrambled or interleaved transaction log entries.
If this is a concern, transaction logs can be maintained one per user by setting
\fCdbtranslog_byuser\fR in the
#set FILE = "config.html#dbtranslog_byuser"
#set TAG = "project config file"
#include link
The \fCdbtranslog\fR name will be used, with the user identity appended,
separated by a dot (.).

 
#include space

.SH Error logs
When an error occurs it is captured and written to an error log.
The name of this file is \fClogs/dberrorlog\fR.
The format of the error log is:
.LP
\fCdate  time  errornum  user  message\fR
.IP
\fBdate\fR and \fBtime\fR indicate when the error occurred;
.IP
\fBerrornum\fR is the error code;
.IP
\fBuser\fR is the identity of the user, which can be set using
#set FILE = "identity.html"
#set TAG = "IDENTITY."
#include link
If no identity has been set, this field will be an equals-sign.
.IP
\fBmessage\fR describes the error.

#include space

.SH Notes
There is no concurrency control on the transaction log or error log, however
as noted above the transaction log can be split up by user.
.LP
Since there is no server, there's no process that persistently has an open file
descriptor on the log files.  

#include bottom
