GCGlib  0.04.228
GCG Graphics Engine

Functions

FILE * gcgGetLogStream ()
 Returns the current log stream. The default log stream is stderr. More...
 
FILE * gcgSetLogStream (FILE *logstream)
 Sets a new stream for logging. The default log stream is stderr. Returns the previous log stream. More...
 
void gcgOutputLog (const char *format,...)
 Reports a new message to the log stream. More...
 

Detailed Description

All report functions of GCGlib use the same log functionality. By default, the log messages are sent to stderr. Using the gcgSetLogStream(), the user can redirect messages to another FILE object. Passing a NULL pointer disables logging. This affect all messages reported by GCGlib.

Function Documentation

◆ gcgGetLogStream()

FILE* gcgGetLogStream ( )

Returns the current log stream. The default log stream is stderr.

Returns
pointer to the current log stream. If no log stream is registered, returns NULL.
See also
gcgSetLogStream()
gcgOutputLog()
Since
0.02.0

◆ gcgOutputLog()

void gcgOutputLog ( const char *  format,
  ... 
)

Reports a new message to the log stream.

Parameters
[in]formatpointer to the format string to be reported. Uses the standard C format string, as documented for printf(). A NULL value is ignored.
See also
gcgSetLogStream()
gcgGetLogStream()
Since
0.02.0

◆ gcgSetLogStream()

FILE* gcgSetLogStream ( FILE *  logstream)

Sets a new stream for logging. The default log stream is stderr. Returns the previous log stream.

Parameters
[in]logstreampointer to the new stream that will receive log messages. If it is NULL, logging is disabled and future messages are discarded.
Returns
pointer to the previous log stream. If no log stream was registered, returns NULL.
See also
gcgGetLogStream()
gcgOutputLog()
Since
0.02.0