Skip to content

api/logging.h

Namespaces

Name
plog
plog::detail
cvedia
cvedia::rt
API for controlling the server and lifecycle management of runtime instances.
cvedia::rt::api
cvedia::rt::api::logging

Classes

Name
class plog::RtFormatter

Types

Name
enum int Log

Functions

Name
void operator<<(util::nostringstream & stream, const std::filesystem::path & p)
Record & operator<<(Record & record, const cvedia::rt::Uuid & pt)
void initLogger(Log instance)
plog::IAppender * getLogger(Log instance)
plog::Severity getSeverity(Log instance)
deque< std::string > getLog()
void log(std::string msg, plog::Severity level)
void enableLogging(bool writeConsole, std::string filename, plog::Severity severity)
void enableLogging()
void pushLogEntry(std::string msg)
plog::IAppender * getLogger()
plog::Severity getSeverity()

Attributes

Name
std::set< std::string > logOnceKeys
std::mutex logOnceMutex
std::string const INSTANCE_GENERAL
std::string const INSTANCE_DECODER
std::string const INSTANCE_INFERENCE
std::string const INSTANCE_TRACKER
std::string const INSTANCE_MOTION
std::string const INSTANCE_DATABASE
std::string const INSTANCE_BUFFER
std::string const INSTANCE_INPUT
std::string const INSTANCE_OUTPUT
std::string const INSTANCE_PROCESSING
std::string const INSTANCE_SOLUTION
std::string const INSTANCE_DISPATCHER
std::string const INSTANCE_ONVIF
std::string const INSTANCE_RTREGISTRY
std::string const INSTANCE_MASTER

Defines

Name
PLOG_CAPTURE_FILE
LOG_ONCE(message, level)

Types Documentation

enum Log

Enumerator Value Description
LogGeneral 0
LogDecoder 1
LogInference 2
LogTracker 3
LogMotion 4
LogDatabase 5
LogBuffer 6
LogInput 7
LogOutput 8
LogProcessing 9
LogSolution 10
LogDispatcher 11
LogOnvif 12
LogRTRegistry 13
LogMaster 9999

Functions Documentation

function operator<<

inline void operator<<(
    util::nostringstream & stream,
    const std::filesystem::path & p
)

function operator<<

inline Record & operator<<(
    Record & record,
    const cvedia::rt::Uuid & pt
)

function initLogger

void initLogger(
    Log instance
)

function getLogger

plog::IAppender * getLogger(
    Log instance
)

function getSeverity

plog::Severity getSeverity(
    Log instance
)

function getLog

deque< std::string > getLog()

function log

void log(
    std::string msg,
    plog::Severity level
)

function enableLogging

void enableLogging(
    bool writeConsole,
    std::string filename,
    plog::Severity severity
)

function enableLogging

void enableLogging()

function pushLogEntry

void pushLogEntry(
    std::string msg
)

function getLogger

plog::IAppender * getLogger()

function getSeverity

plog::Severity getSeverity()

Attributes Documentation

variable logOnceKeys

static std::set< std::string > logOnceKeys;

variable logOnceMutex

static std::mutex logOnceMutex;

variable INSTANCE_GENERAL

std::string const INSTANCE_GENERAL = "general";

variable INSTANCE_DECODER

std::string const INSTANCE_DECODER = "decoder";

variable INSTANCE_INFERENCE

std::string const INSTANCE_INFERENCE = "inference";

variable INSTANCE_TRACKER

std::string const INSTANCE_TRACKER = "tracker";

variable INSTANCE_MOTION

std::string const INSTANCE_MOTION = "motion";

variable INSTANCE_DATABASE

std::string const INSTANCE_DATABASE = "database";

variable INSTANCE_BUFFER

std::string const INSTANCE_BUFFER = "buffer";

variable INSTANCE_INPUT

std::string const INSTANCE_INPUT = "input";

variable INSTANCE_OUTPUT

std::string const INSTANCE_OUTPUT = "output";

variable INSTANCE_PROCESSING

std::string const INSTANCE_PROCESSING = "processing";

variable INSTANCE_SOLUTION

std::string const INSTANCE_SOLUTION = "solution";

variable INSTANCE_DISPATCHER

std::string const INSTANCE_DISPATCHER = "dispatcher";

variable INSTANCE_ONVIF

std::string const INSTANCE_ONVIF = "onvif";

variable INSTANCE_RTREGISTRY

std::string const INSTANCE_RTREGISTRY = "rtregistry";

variable INSTANCE_MASTER

std::string const INSTANCE_MASTER = "master";

Macros Documentation

define PLOG_CAPTURE_FILE

#define PLOG_CAPTURE_FILE 

define LOG_ONCE

#define LOG_ONCE(
    message,
    level
)
    do { \
        std::lock_guard<std::mutex> lock(logOnceMutex); \
        auto key = __FILE__ + std::to_string(__LINE__); \
        if (logOnceKeys.find(key) == logOnceKeys.end()) \
        { \
            logOnceKeys.insert(key); \
            cvedia::rt::api::logging::log(message, level); \
        } \
    } while (0)