JeVois  1.5
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Log.H File Reference
#include <sys/syslog.h>
#include <string.h>
#include <string>
#include <sstream>
#include <cstdint>
#include <mutex>
Include dependency graph for Log.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  jevois::Log< Level >
 Logger class. More...
 
class  jevois::trace::TraceObject
 Helper class for tracing, issues one message on construction, and another on destruction. More...
 
class  jevois::timed_lock_guard
 Acquire a lock object on a std::timed_mutex, or LFATAL after 1 second of waiting. More...
 

Namespaces

 jevois
 
 jevois::trace
 

Macros

#define LDEBUG(msg)
 Convenience macro for users to print out console or syslog messages, DEBUG level. More...
 
#define PLDEBUG(msg)
 Like LDEBUG but appends errno and strerror(errno), to be used when some system call fails. More...
 
#define LINFO(msg)
 Convenience macro for users to print out console or syslog messages, INFO level. More...
 
#define PLINFO(msg)
 Like LINFO but appends errno and strerror(errno), to be used when some system call fails. More...
 
#define LERROR(msg)
 Convenience macro for users to print out console or syslog messages, ERROR level. More...
 
#define PLERROR(msg)
 Like LERROR but appends errno and strerror(errno), to be used when some system call fails. More...
 
#define LFATAL(msg)
 Convenience macro for users to print out console or syslog messages, FATAL level. More...
 
#define PLFATAL(msg)
 Like LDEBUG but appends errno and strerror(errno), to be used when some system call fails. More...
 
#define JEVOIS_ASSERT(cond)
 Test whether something is true and issue an LFATAL if not. More...
 
#define JEVOIS_TRACE(level)
 Trace object. More...
 
#define JEVOIS_TIMED_LOCK(mtx)
 Helper macro to create a timed_lock_guard object. More...
 

Functions

void jevois::warnAndRethrowException ()
 Convenience function to catch an exception, issue some LERROR (depending on type), and rethrow it. More...
 
std::string jevois::warnAndIgnoreException ()
 Convenience function to catch an exception, issue some LERROR (depending on type), and ignore it. More...
 
void jevois::drawErrorImage (std::string const &errmsg, RawImage &videoerrimg)
 Display an error message into a RawImage. More...
 
void jevois::logSetEngine (Engine *e)
 Set an Engine so that all log messages will be forwarded to its serial ports. More...
 

Variables

int jevois::logLevel = LOG_INFO
 Current log level. More...
 
int jevois::traceLevel = 0
 Current trace level. More...