GNode library (C++)
Loading...
Searching...
No Matches
gnode::Logger Class Reference

Manages logging functionality using the spdlog library. More...

#include <logger.hpp>

Static Public Member Functions

static std::shared_ptr< spdlog::logger > & log ()
 Retrieves the singleton instance of the logger.
 

Private Member Functions

 Logger ()=default
 
 Logger (const Logger &)=delete
 
Loggeroperator= (const Logger &)=delete
 

Static Private Attributes

static std::shared_ptr< spdlog::logger > instance
 

Detailed Description

Manages logging functionality using the spdlog library.

The Logger class provides a singleton instance of a logger that can be used throughout the application. It utilizes the spdlog library for logging messages to the standard output with color support.

The class is designed to be a singleton, ensuring that there is only one instance of the logger throughout the application. It provides a static method to access this instance.

Constructor & Destructor Documentation

◆ Logger() [1/2]

gnode::Logger::Logger ( )
privatedefault

◆ Logger() [2/2]

gnode::Logger::Logger ( const Logger )
privatedelete

Member Function Documentation

◆ log()

static std::shared_ptr< spdlog::logger > & gnode::Logger::log ( )
static

Retrieves the singleton instance of the logger.

Returns
A reference to the shared pointer of the logger instance.

This method returns the singleton logger instance. It is used to access the logger for logging messages.

◆ operator=()

Logger & gnode::Logger::operator= ( const Logger )
privatedelete

Member Data Documentation

◆ instance

std::shared_ptr<spdlog::logger> gnode::Logger::instance
staticprivate

The documentation for this class was generated from the following file: