Log interfaces.
More...
#include <fsdk/Def.h>
Go to the source code of this file.
|
namespace | fsdk |
| SDK namespace.
|
|
|
using | fsdk::log::PrintFunction = void (*)(int severity, const char* message) |
| Custom print function type.
|
|
Log interfaces.
- Copyright
- VisionLabs LLC
- Date
- 20.02.2018
◆ 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.
|
◆ 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()
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.