# Logtext

There is a simple filePro-based message saving technique that can be used with the above audit trail technique, or for myriads of other reasons.

This is a filePro command that makes it easy to keep various audit trails. Perhaps it was designed to aid in doing something like "clone" files, but it has many other uses.

The LOGTEXT command allows you to direct messages into a logfile from within clerk or report. Your output will go into a file defined by the environment variable LOGFILE. If you set the environment variable LOGAPPEND, the data you send to the file will be appended at each instance of the LOGTEXT command, otherwise the file is cleared and new data overwrites the old data.

Syntax:

LOGTEXT "message"

Where "message" is any valid expression. Be careful about quotation marks.

Example:

If: 14 gt CL

Then: logtext "Credit limit was exceeded by"<@id<"on

record#"<@rn<"on"<@td<"at"<@tm ; end

The LOGFILE variable must be set before using LOGTEXT.