MantisBase v0.4.9
Loading...
Searching...
No Matches
logger.h File Reference

Structured logging wrapper around spdlog with optional SQLite persistence. More...

#include <iostream>
#include <nlohmann/json.hpp>
#include <spdlog/spdlog.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <memory>
#include "log_database.h"
#include "../../utils/utils.h"
#include "../../core/types.h"
Include dependency graph for logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mb::MbLogger

Namespaces

namespace  mb

Macros

#define MB_FUNC()

Typedefs

typedef enum mb::MbLogLevel mb::MbLogLevel
 Log severity levels mirrored in spdlog and the log database.

Enumerations

enum class  mb::MbLogLevel : uint8_t {
  mb::TRACE = 0 , mb::DEBUG , mb::INFO , mb::WARN ,
  mb::CRITICAL
}
 Log severity levels mirrored in spdlog and the log database. More...

Functions

std::string getFile (const std::string &path)

Detailed Description

Structured logging wrapper around spdlog with optional SQLite persistence.

Created by allan on 12/05/2025.

Macro Definition Documentation

◆ MB_FUNC

#define MB_FUNC ( )
Value:
std::format("{} - {}()", getFile(__FILE__), __FUNCTION__)
std::string getFile(const std::string &path)
Definition logger.h:138

Function Documentation

◆ getFile()

std::string getFile ( const std::string & path)
inline