NeoN
A framework for CFD software
Loading...
Searching...
No Matches
NeoN::Logging::detail Namespace Reference

Classes

struct  FatalFormat

Functions

void logFatal (const std::string &message)
bool shouldLog (Level level, std::string logName="NeoN")
 Returns whether a message at the given level would actually be emitted by the named logger.

Function Documentation

◆ logFatal()

void NeoN::Logging::detail::logFatal ( const std::string & message)

◆ shouldLog()

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.

The convenience helpers below call this BEFORE building the message so that on muted ranks (non-root MPI ranks log at error level only) no string formatting happens at all — keeping the hot path free of cost in distributed runs. It is also null-safe: if the logger is not registered yet it returns false instead of dereferencing a null pointer.