| Face Engine SDK 5.2.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
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. 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. @detais This is equivalent to: More...
FSDK_API void | fsdk::log::setSeverityFilter (int severity) noexcept
| Sets severity logging filter. More...
FSDK_API int | fsdk::log::getSeverityFilter () noexcept
| Get log severity filter. 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.

## ◆ 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] | function | new 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] | severity | desired severity filter.

See also
  Severity.

fsdk::log::getDefaultPrintFunction
FSDK_API PrintFunction getDefaultPrintFunction() noexcept
Get default print function pointer. Is thread-safe.
fsdk::log::setPrintFunction
FSDK_API void setPrintFunction(PrintFunction function) noexcept
Set print function pointer. Default function is made thread-safe with function-local mutex....