NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions
NeoN::Logging Namespace Reference

Namespaces

namespace  detail
 

Classes

class  BaseLogger
 
class  LogEvent
 A class to represent a LogEvent. More...
 
class  Logger
 
class  SupportsLoggingMixin
 a Logging Mixin class that allows to attach logger to certain classes More...
 

Enumerations

enum  Level {
  Trace , Debug , Info , Warning ,
  Error , Critical
}
 
enum  Target { Console , File }
 

Functions

void setNeonDefaultPattern ()
 
void logImpl (std::string sv, Level level, std::string logName="NeoN")
 
void terminate ()
 
template<typename... Args>
void info (std::string formatString, Args... args)
 convenience function to call spdlogs info with std::format
 
template<typename... Args>
void warn (std::string formatString, Args... args)
 convenience function to call spdlogs warn with std::format
 
template<typename... Args>
void debug (std::string formatString, Args... args)
 convenience function to call spdlogs debug with std::format
 
template<typename... Args>
void error (detail::FatalFormat fmtLoc, Args... args)
 Log a fatal formatted message (with the caller's file:line) and abort.
 
void log (std::shared_ptr< BaseLogger > logger, LogEvent &event, std::string_view delim=",")
 convenience function to call log on logger with std::format
 
template<typename CallClass >
void setLogger (CallClass &cls, std::shared_ptr< BaseLogger > logger)
 

Enumeration Type Documentation

◆ Level

Enumerator
Trace 
Debug 
Info 
Warning 
Error 
Critical 

Definition at line 22 of file logging.hpp.

◆ Target

Enumerator
Console 
File 

Definition at line 32 of file logging.hpp.

Function Documentation

◆ debug()

template<typename... Args>
void NeoN::Logging::debug ( std::string  formatString,
Args...  args 
)

convenience function to call spdlogs debug with std::format

Definition at line 136 of file logging.hpp.

◆ error()

template<typename... Args>
void NeoN::Logging::error ( detail::FatalFormat  fmtLoc,
Args...  args 
)

Log a fatal formatted message (with the caller's file:line) and abort.

Definition at line 166 of file logging.hpp.

◆ info()

template<typename... Args>
void NeoN::Logging::info ( std::string  formatString,
Args...  args 
)

convenience function to call spdlogs info with std::format

Definition at line 120 of file logging.hpp.

◆ log()

void NeoN::Logging::log ( std::shared_ptr< BaseLogger logger,
LogEvent event,
std::string_view  delim = "," 
)
inline

convenience function to call log on logger with std::format

Definition at line 193 of file logging.hpp.

◆ logImpl()

void NeoN::Logging::logImpl ( std::string  sv,
Level  level,
std::string  logName = "NeoN" 
)

◆ setLogger()

template<typename CallClass >
void NeoN::Logging::setLogger ( CallClass &  cls,
std::shared_ptr< BaseLogger logger 
)

Definition at line 243 of file logging.hpp.

◆ setNeonDefaultPattern()

void NeoN::Logging::setNeonDefaultPattern ( )

Configure the default "NeoN" logger and the rank-based mute policy. Reads the MPI rank internally (when MPI support is enabled and MPI is initialized), so it works with or without MPI and needs no argument. Call after the host has initialized MPI so the rank is known.

◆ terminate()

void NeoN::Logging::terminate ( )

◆ warn()

template<typename... Args>
void NeoN::Logging::warn ( std::string  formatString,
Args...  args 
)

convenience function to call spdlogs warn with std::format

Definition at line 128 of file logging.hpp.