Internal log and error handling for NNStreamer plugins and core codes. More...
#include <execinfo.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <glib.h>
#include "nnstreamer_log.h"
Go to the source code of this file.
Macros | |
#define | _NNSTREAMER_ERROR_LENGTH (4096U) |
Functions | |
char * | _backtrace_to_string (void) |
stack trace as a string for error messages More... | |
G_LOCK_DEFINE_STATIC (errlock) | |
const char * | _nnstreamer_error (void) |
return the last internal error string and clean it. More... | |
__attribute__ ((__format__(__printf__, 1, 2))) | |
overwrites the error message buffer with the new message. More... | |
void | _nnstreamer_error_clean (void) |
cleans up the error message buffer. More... | |
Variables | |
static char | errmsg [_NNSTREAMER_ERROR_LENGTH] = { 0 } |
static int | errmsg_reported = 0 |
Internal log and error handling for NNStreamer plugins and core codes.
Definition in file nnstreamer_log.c.
#define _NNSTREAMER_ERROR_LENGTH (4096U) |
Definition at line 70 of file nnstreamer_log.c.
__attribute__ | ( | (__format__(__printf__, 1, 2)) | ) |
overwrites the error message buffer with the new message.
The attribute is for clang workaround in macos: https://stackoverflow.com/questions/20167124/vsprintf-and-vsnprintf-wformat-nonliteral-warning-on-clang-5-0
Definition at line 97 of file nnstreamer_log.c.
char* _backtrace_to_string | ( | void | ) |
stack trace as a string for error messages
Definition at line 35 of file nnstreamer_log.c.
const char* _nnstreamer_error | ( | void | ) |
return the last internal error string and clean it.
Definition at line 81 of file nnstreamer_log.c.
void _nnstreamer_error_clean | ( | void | ) |
cleans up the error message buffer.
Definition at line 120 of file nnstreamer_log.c.
G_LOCK_DEFINE_STATIC | ( | errlock | ) |
|
static |
Definition at line 71 of file nnstreamer_log.c.
|
static |
Definition at line 73 of file nnstreamer_log.c.