Next: , Previous: , Up: dbconfig file   [Contents][Index]


4.3.6 Audit-trail formats

These formats are similar to the named query formats, but they include more options. They are used for formatting audit-trail entries and for outgoing email messages.

There is currently only one audit-trail format, defined by the audit-trail-format option:

audit-trail-format {
  format "formatstring"
  [ fields { "fieldname" [ "fieldname" ... ] } ]
}

For those fields that require an audit-trail entry, the audit-trail text to be appended is formatted as described by this format. The per-field audit-trail-format is used in preference to this one, if it exists.

formatstring and fieldname are similar to those used by the named query format. fieldname may also be a format parameter, which is a context-specific value. (Format parameters are distinguished from fieldnames by a leading dollar sign (‘$’)).

The following format parameters are defined for audit-trail-format entries:

$Fieldname

The name of the field for which an audit-trail entry is being created.

$OldValue

The old value of the field.

$NewValue

The new field value.

$EditUserEmailAddr

The email address of the user editing the field. Set by the EDITADDR gnatsd command or from the responsible file; if not available, user’s local address is used.

$CurrentDate

The current date.

$ChangeReason

The reason for the change; may be blank if no reason was supplied.

These parameters may be used anywhere a fieldname can appear.