Version: 2.0d6
Release Date: Tuesday, October 14, 1997
Expires no later than: December 31, 1997
Important: THIS DOCUMENTATION IS INCOMPLETE AND PROBABLY A BIT INACCURATE
It is subject to change as the API matures.
Feedback and contributions are encouraged:
grantcgi@list.nisto.com
or grant@achilles.net
Plug-ins may use the web server's log file, or their own log file.
Display support is not yet implemented for CGIs.
CGIErr DisplayString ( APIData apidata, char *theString )
Takes a C format (null terminated) string and writes it to the log file. Appends a linebreak after the entry.
CGIErr ServerLogWriteEntry ( APIData apidata, char *theString )
Takes a C format (null terminated) string and writes it to the server's log file. Appends a linebreak after the entry.
Note: not implemented when compiling as a CGI.
CGIErr LogRegisterAsLogging ( APIData apidata )
"By making this call, your plug-in is registered to receive logging messages. Logging plug-ins can perform the same functions as post-processors and are invoked immediately after any post-processor function. There can be multiple logging plug-ins." "When a plug-in is invoked with a logging message, the HTTP connection to the client is already closed. All connection-related parameters/fields are available to the logging plug-in, but no HTTP communications functions will be allowed." -- WSAPI 1.2
CGIErr LogWriteEntry ( APIData apidata, char *theString )
Takes a C format (null terminated) string and writes it to the log file. Appends a linebreak after the entry.
CGIErr LogWriteDebugEntry ( APIData apidata, char *theString, char *theFileString, UInt16 theLineNumber )
This call should generally be used in the form: LogWriteDebugEntry ( apidata, "some message", __FILE__, __LINE__ );
OSErr LogStartup ( void )
Initialize the log file.
OSErr LogQuit ( void )
OSErr LogFileOpen ( void )
Open the log file for writing. Writing will begin at the end of the file (appending)
OSErr LogFileClose ( void )
Close the log file.
OSErr LogFileFlush ( void )
This function should be called periodically after data has been written to the log file. It helps to ensure that the data is not lost if there is a crash before the file is closed.
OSErr LogString ( const char *theString )
Takes a C format string and writes it to the log file. Does not append linebreak or any other character so the next write to the log file will follow directly after this write. If you want to have theString followed by a linebreak, you need to call one of the functions that appends a separator character after theString.
OSErr LogStringP ( const StringPtr theString )
Does not append linebreak or any other character so the next write to the log file will follow directly after this write. If you want to have theString followed by a linebreak, you need to call one of the functions that appends a separator character after theString.
theString
OSErr LogStringAndSeparator ( const char *theString, char theSeparator )
Takes a C format string and writes it to the log file. Appends theSeparator after theString. This may be used for writing theString followed by a linefeed, or perhaps a tab character, among other uses.
OSErr LogStringAndSeparatorP ( const StringPtr theString, char theSeparator )
Same as 'LogStringAndSeparator', except for string format.
theString
These functions will prepend "DEBUG: " in the log file before writing theString that is passed to them.
The functions are prototyped in "LogUtil.h" to map to NULL (do nothing) if the 'kCompileWithDebugLogging' option is off in "MyConfiguration.h"
OSErr LogStringDebug ( const char *theString )
OSErr LogStringDebugP ( const StringPtr theString )