MeshLib Documentation
Loading...
Searching...
No Matches
MR::Logger Class Reference

Make default spd logger. More...

#include <MRLog.h>

Public Member Functions

MRMESH_API const std::shared_ptr< spdlog::logger > & getSpdLogger () const
 store this pointer if need to prolong logger life time (necessary to log something from destructors)
 
MRMESH_API std::string getDefaultPattern () const
 returns default logger pattern
 
MRMESH_API void addSink (const spdlog::sink_ptr &sink)
 adds custom sink to logger
 
MRMESH_API void removeSink (const spdlog::sink_ptr &sink)
 
MRMESH_API std::filesystem::path getLogFileName () const
 return filename of first found file sink, if there is no one, returns {}
 

Static Public Member Functions

static MRMESH_API Loggerinstance ()
 

Detailed Description

Make default spd logger.

Member Function Documentation

◆ addSink()

MRMESH_API void MR::Logger::addSink ( const spdlog::sink_ptr & sink)

adds custom sink to logger

◆ getDefaultPattern()

MRMESH_API std::string MR::Logger::getDefaultPattern ( ) const

returns default logger pattern

◆ getLogFileName()

MRMESH_API std::filesystem::path MR::Logger::getLogFileName ( ) const

return filename of first found file sink, if there is no one, returns {}

◆ getSpdLogger()

MRMESH_API const std::shared_ptr< spdlog::logger > & MR::Logger::getSpdLogger ( ) const

store this pointer if need to prolong logger life time (necessary to log something from destructors)

◆ instance()

static MRMESH_API Logger & MR::Logger::instance ( )
static

◆ removeSink()

MRMESH_API void MR::Logger::removeSink ( const spdlog::sink_ptr & sink)

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