| Face Engine SDK 4.9.0 A face detection, recognition and tracking engine.

Namespaces | Typedefs | Enumerations | Functions
Log.h File Reference

Log interfaces. More...

`#include <fsdk/Def.h>`

Go to the source code of this file.

## Namespaces
| 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
void FSDK_API | 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. More...
FSDK_API PrintFunction | fsdk::log::getPrintFunction () noexcept
| Get print function pointer. More...
FSDK_API PrintFunction | fsdk::log::getDefaultPrintFunction () noexcept
| Get default print function pointer. Is thread-safe. More...
FSDK_API void | fsdk::log::restorePrintFunction () noexcept
| Helper function to restore default print function. This is equivalent to: More...

## Detailed Description

Log interfaces.

Copyright
  VisionLabs LLC

Date
  20.02.2018

## Enumeration Type Documentation

## ◆ Severity

enum fsdk::log::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.

## ◆ restorePrintFunction()

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

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

setPrintFunction(getDefaultPrintFunction());

## ◆ setPrintFunction()

void FSDK_API 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] | function | new function pointer.

See also
  PrintFunction. Any exception thrown out of param function is catched, but not throwing is better idea still.