Skip to content

7.15 lou_registerLogCallback

typedef void (*logcallback) (
  int level,
  const char *message);
  
void lou_registerLogCallback (
  logcallback callback);

This function can be used to register a custom logging callback. The callback must take two arguments, the log level and the message string. By default log messages are printed to stderr, or if a filename was specified with lou_logFile then messages are logged to that file. lou_registerLogCallback overrides the default callback. Passing NULL resets to the default callback.