Face Engine SDK 5.25.0
A face detection, recognition and tracking engine.
Loading...
Searching...
No Matches
Log.h File Reference

Log interfaces. More...

#include <fsdk/Def.h>

Go to the source code of this file.

Namespaces

namespace  fsdk
 SDK namespace.
 

Typedefs

using fsdk::log::PrintFunction = void (*)(int severity, const char* message)
 Custom print function type.
 

Enumerations

enum  fsdk::log::Severity {
  fsdk::log::SV_ERROR = 1 , fsdk::log::SV_WARN , fsdk::log::SV_INFO , fsdk::log::SV_DEBUG ,
  fsdk::log::SV_DEFAULT = SV_DEBUG
}
 Log message severity enumeration. More...
 

Functions

FSDK_API void fsdk::log::setPrintFunction (PrintFunction function) noexcept
 Set print function pointer. Default function is made thread-safe with function-local mutex. It means that if you provide your custom print function it's your duty to make it thread safe or not thread safe.
 
FSDK_API PrintFunction fsdk::log::getPrintFunction () noexcept
 Get print function pointer.
 
FSDK_API PrintFunction fsdk::log::getDefaultPrintFunction () noexcept
 Get default print function pointer. Is thread-safe.
 
FSDK_API void fsdk::log::restorePrintFunction () noexcept
 Helper function to restore default print function. @detais This is equivalent to:
 
FSDK_API void fsdk::log::setSeverityFilter (int severity) noexcept
 Sets severity logging filter.
 
FSDK_API int fsdk::log::getSeverityFilter () noexcept
 Get log severity filter.
 

Detailed Description

Log interfaces.

Date
20.02.2018

Enumeration Type Documentation

◆ Severity

Log message severity enumeration.

Enumerator
SV_ERROR 

Critical error.

SV_WARN 

Recoverable error / non-critical issue.

SV_INFO 

Generic information.

SV_DEBUG 

Extended (debugging) information (verbose).

SV_DEFAULT 

Default severity.

Function Documentation

◆ getDefaultPrintFunction()

FSDK_API PrintFunction fsdk::log::getDefaultPrintFunction ( )
noexcept

Get default print function pointer. Is thread-safe.

Returns
print function pointer.
See also
PrintFunction.

◆ getPrintFunction()

FSDK_API PrintFunction fsdk::log::getPrintFunction ( )
noexcept

Get print function pointer.

Returns
print function pointer.
See also
PrintFunction.

◆ getSeverityFilter()

FSDK_API int fsdk::log::getSeverityFilter ( )
noexcept

Get log severity filter.

Returns
severity level.
See also
Severity.

◆ restorePrintFunction()

FSDK_API void fsdk::log::restorePrintFunction ( )
noexcept

Helper function to restore default print function. @detais This is equivalent to:

setPrintFunction(getDefaultPrintFunction());

◆ setPrintFunction()

FSDK_API void fsdk::log::setPrintFunction ( PrintFunction function)
noexcept

Set print function pointer. Default function is made thread-safe with function-local mutex. It means that if you provide your custom print function it's your duty to make it thread safe or not thread safe.

Parameters
[in]functionnew function pointer.
See also
PrintFunction. Any exception thrown out of param function is catched, but not throwing is better idea still.

◆ setSeverityFilter()

FSDK_API void fsdk::log::setSeverityFilter ( int severity)
noexcept

Sets severity logging filter.

Parameters
[in]severitydesired severity filter.
See also
Severity.