mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
17723d290a
## Link to GitHub Issue, if one exists n/a ## Description of change Make the text color cyan to make the messages stand out. ## Testing Verified in terminal.
36 lines
762 B
C++
36 lines
762 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace logger {
|
|
|
|
// settings
|
|
extern bool BLOCKING;
|
|
extern bool COLOR;
|
|
|
|
enum Style {
|
|
DEFAULT = 0,
|
|
GREY = 1,
|
|
YELLOW = 2,
|
|
RED = 3,
|
|
SPECIAL = 4,
|
|
};
|
|
|
|
void start();
|
|
void stop();
|
|
void push(std::string data, Style color, bool terminate = false);
|
|
|
|
// log hooks
|
|
typedef bool (*LogHook_t)(void *user, const std::string &data, Style style, std::string &out);
|
|
void hook_add(LogHook_t hook, void *user);
|
|
void hook_remove(LogHook_t hook, void *user);
|
|
|
|
class PCBIDFilter {
|
|
public:
|
|
PCBIDFilter();
|
|
~PCBIDFilter();
|
|
private:
|
|
static bool filter(void *user, const std::string &data, Style style, std::string &out);
|
|
};
|
|
}
|