NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions
logging.hpp File Reference
#include <chrono>
#include <source_location>
#include <memory>
#include <string>
#include <string_view>
#include <fmt/core.h>
#include <fmt/chrono.h>
#include "NeoN/core/mpi/environment.hpp"

Go to the source code of this file.

Classes

class  NeoN::Logging::LogEvent
 A class to represent a LogEvent. More...
 
struct  NeoN::Logging::detail::FatalFormat
 
class  NeoN::Logging::BaseLogger
 
class  NeoN::Logging::Logger
 
class  NeoN::Logging::SupportsLoggingMixin
 a Logging Mixin class that allows to attach logger to certain classes More...
 

Namespaces

namespace  NeoN
 Integer types used throughout NeoN.
 
namespace  NeoN::Logging
 
namespace  NeoN::Logging::detail
 

Enumerations

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

Functions

void NeoN::Logging::setNeonDefaultPattern ()
 
void NeoN::Logging::logImpl (std::string sv, Level level, std::string logName="NeoN")
 
void NeoN::Logging::terminate ()
 
bool NeoN::Logging::detail::shouldLog (Level level, std::string logName="NeoN")
 Returns whether a message at the given level would actually be emitted by the named logger.
 
void NeoN::Logging::detail::logFatal (const std::string &message)
 
template<typename... Args>
void NeoN::Logging::info (std::string formatString, Args... args)
 convenience function to call spdlogs info with std::format
 
template<typename... Args>
void NeoN::Logging::warn (std::string formatString, Args... args)
 convenience function to call spdlogs warn with std::format
 
template<typename... Args>
void NeoN::Logging::debug (std::string formatString, Args... args)
 convenience function to call spdlogs debug with std::format
 
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.
 
void NeoN::Logging::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 NeoN::Logging::setLogger (CallClass &cls, std::shared_ptr< BaseLogger > logger)