User-Defined Function API  9.0
 All Classes Functions Typedefs Enumerations Enumerator
marklogic::Reporter Class Referenceabstract

Log messages and report errors to MarkLogic Server. You do not need to subclass this class. More...

#include <MarkLogic.h>

Public Types

enum   LogLevel {
  Finest, Finer, Fine, Debug,
  Config, Info, Notice, Warning,
  Error, Critical, Alert, Emergency,
  Disabled
}
  Available log levels.
 

Public Member Functions

virtual LogLevel  logLevel () const =0
  Determine the current log level. More...
 
virtual void  log (LogLevel level, const char *message)=0
  Log a message at a particular log level.
 
virtual void  error (const char *message)=0
  Log an error and cancel the current job. More...
 

Detailed Description

Log messages and report errors to MarkLogic Server. You do not need to subclass this class.

Messages logged by Reporter::log are written to the MarkLogic Server log. For example, to marklogic_dir/Logs/ErrorLog.txt.

Rather than throwing exceptions, your AggregateUDF implementation should report errors by calling Reporter::error. Errors reported this way write a message to the log file, cancel the current job, and raise a MarkLogic Server exception to the calling application.

Member Function Documentation

virtual void marklogic::Reporter::error ( const char *  message )
pure virtual

Log an error and cancel the current job.

The task that calls this function stops immediately. That is, control does not return to your code. In-progress tasks for the same job may still run to completion.

virtual LogLevel marklogic::Reporter::logLevel ( ) const
pure virtual

Determine the current log level.

Only messages at this level and above appear in the log.


The documentation for this class was generated from the following file: