Back

logappend

logappend -T <timestamp> -K <token> (-D <doctor-name> | -N <nurse-name>) (-A | -L) [-R <room-id>] -F <log>
logappend -B <file>

Appends data to the log at the specified timestamp using the authentication token. If the log does not exist, logappend will create it. Otherwise it will append to the existing log.

If the data to be appended to the log is not consistent with the current state of the log, logappend should exit with an error condition and leave the state of the log unchanged.

After logappend exits, the log specified by log argument should be updated. The added information should be accessible by the logread tool when the token provided to both programs is the same, and not available (e.g. by inspecting the file directly) otherwise.

Return values and error conditions

If logappend must exit with an error condition, or if the argument combination is incomplete or contradictory, the log should not be modified and logappend should print "invalid" to stdout and exit, returning 255.

Some examples of conditions that would result in printing "invalid" and doing nothing to the log: