gForceSDK
logredirect.h File Reference
#include "gfTypes.h"

Go to the source code of this file.

Typedefs

typedef void(* LogMethod) (gf::GF_UINT level, const gf::GF_PCHAR logmsg)
 The function pointer type for log re-direction. More...
 

Functions

void log_set_output_function (LogMethod logmethod)
 Re-direct log output. More...
 

Detailed Description

Version
0.1
Date
2017.4.20

Typedef Documentation

◆ LogMethod

typedef void(* LogMethod) (gf::GF_UINT level, const gf::GF_PCHAR logmsg)

The function pointer type for log re-direction.

Parameters
handleA device handle indicates the enumeration result
levelLog output level.
logmsgThe log content
Remarks
In Windows, level represents enum GF_LOG_LEVEL.
In Android, level represents enum android_LogPriority.

Function Documentation

◆ log_set_output_function()

void log_set_output_function ( LogMethod  logmethod)

Re-direct log output.

Parameters
logmethodthe client log out method
Remarks
The default log out is the stdio, this method allows client to redirect it Set the param to nullptr to reset log method