Microsoft Information Protection (MIP) SDK for C: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C
Loading...
Searching...
No Matches
logger_delegate_cc.h File Reference

Defines logger callback functions. More...

+ Include dependency graph for logger_delegate_cc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mip_cc_create_logger_delegate_message_data_args
 
struct  mip_cc_log_message_data
 

Typedefs

typedef mip_cc_handlemip_cc_logger_delegate
 

Enumerations

enum  mip_cc_log_level {
  MIP_LOG_LEVEL_TRACE = 0 ,
  MIP_LOG_LEVEL_INFO ,
  MIP_LOG_LEVEL_WARNING ,
  MIP_LOG_LEVEL_ERROR
}
 Log level. More...
 

Functions

 MIP_CC_API (mip_cc_result) MIP_CC_CreateLoggerDelegate(const mip_cc_logger_init_callback_fn initCallback
 Creates a logger delegate which can be used to override MIP's default logger.
 
 MIP_CC_API (void) MIP_CC_ReleaseLoggerDelegate(mip_cc_logger_delegate loggerDelegate)
 Release resources associated with an logger delegate handle.
 
 MIP_CC_CALLBACK (mip_cc_logger_flush_callback_fn, void)
 Callback function definition for flushing logs to disk.
 
 MIP_CC_CALLBACK (mip_cc_logger_init_callback_fn, void, const char *)
 Callback function definition for initialization of logger.
 
 MIP_CC_CALLBACK (mip_cc_logger_write_callback_fn, void, const mip_cc_log_level, const char *, const char *, const char *, const int32_t)
 Callback function definition for writing a log statement.
 
 MIP_CC_CALLBACK (mip_cc_logger_write_with_message_data_callback_fn, void, mip_cc_log_message_data logMessageData)
 Callback function definition for writing a log statement.
 

Variables

const mip_cc_logger_flush_callback_fn const mip_cc_logger_write_callback_fn mip_cc_logger_delegate mip_cc_errorerrorInfo
 
const mip_cc_logger_flush_callback_fn flushCallback
 
const mip_cc_logger_flush_callback_fn const mip_cc_logger_write_callback_fn mip_cc_logger_delegateloggerDelegate
 
const mip_cc_logger_flush_callback_fn const mip_cc_logger_write_callback_fn writeCallback
 

Detailed Description

Defines logger callback functions.

Definition in file logger_delegate_cc.h.

Typedef Documentation

◆ mip_cc_logger_delegate

Definition at line 105 of file logger_delegate_cc.h.

Enumeration Type Documentation

◆ mip_cc_log_level

Log level.

Enumerator
MIP_LOG_LEVEL_TRACE 

Trace.

MIP_LOG_LEVEL_INFO 

Info.

MIP_LOG_LEVEL_WARNING 

Warning.

MIP_LOG_LEVEL_ERROR 

Error.

Definition at line 45 of file logger_delegate_cc.h.

45 {
46 MIP_LOG_LEVEL_TRACE = 0, /**< Trace */
47 MIP_LOG_LEVEL_INFO, /**< Info */
48 MIP_LOG_LEVEL_WARNING, /**< Warning */
49 MIP_LOG_LEVEL_ERROR, /**< Error */
mip_cc_log_level
Log level.
@ MIP_LOG_LEVEL_TRACE
Trace.
@ MIP_LOG_LEVEL_INFO
Info.
@ MIP_LOG_LEVEL_ERROR
Error.
@ MIP_LOG_LEVEL_WARNING
Warning.

Function Documentation

◆ MIP_CC_API() [1/2]

MIP_CC_API ( mip_cc_result ) const

Creates a logger delegate which can be used to override MIP's default logger.

Parameters
initCallbackFunction pointer for initialization
flushCallbackFunction pointer for flushing logs
writeCallbackFunction pointer for writing a log statement
loggerDelegate[Output] Handle to logger delegate object
errorInfo[Output] (Optional) Failure info if operation result is error
Returns
Result code indicating success or failure
Parameters
methodargsArguments to this function
Returns
Result code indicating success or failure

◆ MIP_CC_API() [2/2]

MIP_CC_API ( void )

Release resources associated with an logger delegate handle.

Parameters
loggerDelegatelogger delegate to be released

◆ MIP_CC_CALLBACK() [1/4]

MIP_CC_CALLBACK ( mip_cc_logger_flush_callback_fn ,
void  )

Callback function definition for flushing logs to disk.

◆ MIP_CC_CALLBACK() [2/4]

MIP_CC_CALLBACK ( mip_cc_logger_init_callback_fn ,
void ,
const char *  )

Callback function definition for initialization of logger.

Parameters
storagePathFile path where logs may be stored

◆ MIP_CC_CALLBACK() [3/4]

MIP_CC_CALLBACK ( mip_cc_logger_write_callback_fn ,
void ,
const mip_cc_log_level ,
const char * ,
const char * ,
const char * ,
const int32_t  )

Callback function definition for writing a log statement.

Parameters
levelthe log level for the log statement.
messagethe message for the log statement.
functionthe function name for the log statement.
filethe file name where log statement was generated.
linethe line number where the log statement was generated.

◆ MIP_CC_CALLBACK() [4/4]

MIP_CC_CALLBACK ( mip_cc_logger_write_with_message_data_callback_fn ,
void ,
mip_cc_log_message_data logMessageData )

Callback function definition for writing a log statement.

Parameters
logMessageDataThe log data

Variable Documentation

◆ errorInfo

const mip_cc_logger_flush_callback_fn const mip_cc_logger_write_callback_fn mip_cc_logger_delegate mip_cc_error* errorInfo

Definition at line 123 of file logger_delegate_cc.h.

◆ flushCallback

const mip_cc_logger_flush_callback_fn flushCallback

Definition at line 120 of file logger_delegate_cc.h.

◆ loggerDelegate

const mip_cc_logger_flush_callback_fn const mip_cc_logger_write_callback_fn mip_cc_logger_delegate* loggerDelegate

Definition at line 122 of file logger_delegate_cc.h.

◆ writeCallback

const mip_cc_logger_flush_callback_fn const mip_cc_logger_write_callback_fn writeCallback

Definition at line 121 of file logger_delegate_cc.h.