Blue Brain BioExplorer
Logs.h File Reference
#include <iostream>
Include dependency graph for Logs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 core
 

Macros

#define CORE_PREFIX   "CORE "
 
#define PROGRESS_BAR_SIZE   50
 
#define CORE_ERROR(__msg)   std::cerr << "E [" << CORE_PREFIX << "] " << __msg << std::endl;
 
#define CORE_WARN(__msg)   std::cerr << "W [" << CORE_PREFIX << "] " << __msg << std::endl;
 
#define CORE_INFO(__msg)   std::cout << "I [" << CORE_PREFIX << "] " << __msg << std::endl;
 
#define CORE_DEBUG(__msg)   std::cout << "D [" << CORE_PREFIX << "] " << __msg << std::endl;
 
#define CORE_TIMER(__time, __msg)   std::cout << "T [" << CORE_PREFIX << "] [" << __time << "] " << __msg << std::endl;
 
#define CORE_THROW(__msg)
 
#define CORE_PROGRESS(__msg, __progress, __maxValue)
 
#define PLUGIN_REGISTER_ENDPOINT(__msg)   CORE_INFO("Registering end-point '" << __msg << "'");
 
#define PLUGIN_REGISTER_RENDERER(__msg)   CORE_INFO("Registering renderer '" << __msg << "'");
 
#define PLUGIN_REGISTER_LOADER(__msg)   CORE_INFO("Registering loader '" << __msg << "'");
 
#define PLUGIN_REGISTER_CAMERA(__msg)   CORE_INFO("Registering camera '" << __msg << "'");
 

Macro Definition Documentation

◆ CORE_DEBUG

#define CORE_DEBUG (   __msg)    std::cout << "D [" << CORE_PREFIX << "] " << __msg << std::endl;

Definition at line 38 of file Logs.h.

◆ CORE_ERROR

#define CORE_ERROR (   __msg)    std::cerr << "E [" << CORE_PREFIX << "] " << __msg << std::endl;

Definition at line 31 of file Logs.h.

◆ CORE_INFO

#define CORE_INFO (   __msg)    std::cout << "I [" << CORE_PREFIX << "] " << __msg << std::endl;

Definition at line 33 of file Logs.h.

◆ CORE_PREFIX

#define CORE_PREFIX   "CORE "

Definition at line 27 of file Logs.h.

◆ CORE_PROGRESS

#define CORE_PROGRESS (   __msg,
  __progress,
  __maxValue 
)
Value:
{ \
std::cout << "I [" << CORE_PREFIX << "] ["; \
const float __mv = float(__maxValue); \
const float __p = float(__progress + 1); \
const uint32_t __pos = std::min(PROGRESS_BAR_SIZE, int(__p / __mv * PROGRESS_BAR_SIZE)); \
for (uint32_t __i = 0; __i < PROGRESS_BAR_SIZE; ++__i) \
{ \
if (__i < __pos) \
std::cout << "="; \
else if (__i == __pos) \
std::cout << ">"; \
else \
std::cout << " "; \
} \
std::cout << "] " << std::min(__pos * 2, uint32_t(PROGRESS_BAR_SIZE * 2)) << "% " << __msg << "\r"; \
std::cout.flush(); \
}
#define CORE_PREFIX
Definition: Logs.h:27
#define PROGRESS_BAR_SIZE
Definition: Logs.h:29

Definition at line 47 of file Logs.h.

◆ CORE_THROW

#define CORE_THROW (   __msg)
Value:
{ \
throw std::runtime_error(__msg); \
}

Definition at line 42 of file Logs.h.

◆ CORE_TIMER

#define CORE_TIMER (   __time,
  __msg 
)    std::cout << "T [" << CORE_PREFIX << "] [" << __time << "] " << __msg << std::endl;

Definition at line 40 of file Logs.h.

◆ CORE_WARN

#define CORE_WARN (   __msg)    std::cerr << "W [" << CORE_PREFIX << "] " << __msg << std::endl;

Definition at line 32 of file Logs.h.

◆ PLUGIN_REGISTER_CAMERA

#define PLUGIN_REGISTER_CAMERA (   __msg)    CORE_INFO("Registering camera '" << __msg << "'");

Definition at line 69 of file Logs.h.

◆ PLUGIN_REGISTER_ENDPOINT

#define PLUGIN_REGISTER_ENDPOINT (   __msg)    CORE_INFO("Registering end-point '" << __msg << "'");

Definition at line 66 of file Logs.h.

◆ PLUGIN_REGISTER_LOADER

#define PLUGIN_REGISTER_LOADER (   __msg)    CORE_INFO("Registering loader '" << __msg << "'");

Definition at line 68 of file Logs.h.

◆ PLUGIN_REGISTER_RENDERER

#define PLUGIN_REGISTER_RENDERER (   __msg)    CORE_INFO("Registering renderer '" << __msg << "'");

Definition at line 67 of file Logs.h.

◆ PROGRESS_BAR_SIZE

#define PROGRESS_BAR_SIZE   50

Definition at line 29 of file Logs.h.