Kudu C++ client API
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
kudu::client::KuduLoggingFunctionCallback< T > Class Template Reference

The logging callback that invokes a function by pointer with a single argument. More...

#include <callbacks.h>

Inheritance diagram for kudu::client::KuduLoggingFunctionCallback< T >:
kudu::client::KuduLoggingCallback

Public Types

typedef void(* FunctionType )(T arg, KuduLogSeverity severity, const char *filename, int line_number, const struct::tm *time, const char *message, size_t message_len)
 A handy typedef for the function with appropriate signature.
 

Public Member Functions

 KuduLoggingFunctionCallback (FunctionType function, T arg)
 
virtual void Run (KuduLogSeverity severity, const char *filename, int line_number, const struct::tm *time, const char *message, size_t message_len) OVERRIDE
 

Detailed Description

template<typename T>
class kudu::client::KuduLoggingFunctionCallback< T >

The logging callback that invokes a function by pointer with a single argument.

Constructor & Destructor Documentation

template<typename T >
kudu::client::KuduLoggingFunctionCallback< T >::KuduLoggingFunctionCallback ( FunctionType  function,
arg 
)
inline

Build an instance of KuduLoggingFunctionCallback.

Parameters
[in]functionA pointer to the logging function to invoke with the arg argument.
[in]argAn argument for the function invocation.

Member Function Documentation

template<typename T >
virtual void kudu::client::KuduLoggingFunctionCallback< T >::Run ( KuduLogSeverity  severity,
const char *  filename,
int  line_number,
const struct::tm *  time,
const char *  message,
size_t  message_len 
)
inlinevirtual

Log the message.

Note
The message is NOT terminated with an endline.
Parameters
[in]severitySeverity of the log message.
[in]filenameThe name of the source file the message is originated from.
[in]line_numberThe line of the source file the message is originated from.
[in]timeThe absolute time when the log event was generated.
[in]messageThe message to log. It's not terminated with an endline.
[in]message_lenNumber of characters in the message.

Implements kudu::client::KuduLoggingCallback.


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