OC Updated for version 2.0
Functions
OClog Management

Functions

void oc_loginit (void)
int oc_setlogging (int tf)
int oc_logopen (const char *file)
void oc_logclose (void)
void oc_log (int tag, const char *format,...)
void oc_logtext (int tag, const char *text)

Function Documentation

void oc_log ( int  tag,
const char *  format,
  ... 
)

Send logging messages. This uses a variable number of arguments and operates like the stdio printf function.

Parameters:
[in]tagIndicate the kind of this log message.
[in]formatFormat specification as with printf.

Definition at line 128 of file oclog.c.

void oc_logclose ( void  )

Close the logging output file (unless it is stderr). Logging is still enabled.

Definition at line 108 of file oclog.c.

void oc_loginit ( void  )

Definition at line 26 of file oclog.c.

References ENVFLAG, oc_logopen(), and oc_setlogging().

Referenced by oc_logopen(), and oc_setlogging().

int oc_logopen ( const char *  file)

Specify a file into which to place logging output.

Parameters:
[in]fileThe name of the file into which to place logging output. If the file has the value NULL, then send logging output to stderr.
Returns:
zero if the open failed, one otherwise.

Definition at line 69 of file oclog.c.

References oc_loginit(), and oc_setlogging().

Referenced by oc_loginit().

void oc_logtext ( int  tag,
const char *  text 
)

Send arbitrarily long text as a logging message. Each line will be sent using oc_log with the specified tag.

Parameters:
[in]tagIndicate the kind of this log message.
[in]textArbitrary text to send as a logging message.

Definition at line 164 of file oclog.c.

int oc_setlogging ( int  tf)

Enable/Disable logging.

Parameters:
[in]tfIf 1, then turn on logging, if 0, then turn off logging.
Returns:
The previous value of the logging flag.

Definition at line 50 of file oclog.c.

References oc_loginit().

Referenced by oc_loginit(), and oc_logopen().