LOGOPEN(3A) LOGOPEN(3A)
NAME
LogOpen, LogClose, LogReopen - open and close application
logging files
SYNOPSIS
int LogOpen (name)
char *name;
LogReopen (name)
char *name;
LogClose()
DESCRIPTION
These routines help to log the progress of an application in
a log file. They are intended to aid debugging, both during
development, and after releasing a product.
LogOpen opens a logfile. The string name is used to
construct a log file name. This normally is the abbreviated
application or program name. The file name constructed is
""/var/spool/Atari/logs/nameXXXXXX"", which is then passed
to mktemp(3). If the name has a '/' in it, then it is used
without any alteration. There are two special values for
name, ""stdout"" and ""stderr"", that cause standard output
and standard error to be used as indicated.
If a log file has already been opened, LogOpen does nothing.
Instead, LogReopen is used to change the log file.
LogReopen closes the current log file without removing it,
then opens the named file. If the open fails, the log file
remains closed.
LogClose closes the log file and removes it. It should only
be called upon the normal termination of the program.
Abnormal program terminations will usually want to leave the
log file around for inspection by a knowledgable person.
NOTES
Page 1 (printed 9/3/91)
LOGOPEN(3A) LOGOPEN(3A)
LogOpen is automatically called by AtariLibInit(3) with the
application program name. However, once a LogOpen succeeds,
further calls to it will be ignored, so the developer can
call LogOpen before AtariLibInit to use a different log file
name.
SEE ALSO
AtariLibInit(3A), LogWrite(3A)
Page 2 (printed 9/3/91)