KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Classes | List of all members
Kratos::LoggerMessage Class Reference

LoggerMessage class holdes message and the properties of the message. More...

#include <logger_message.h>

Collaboration diagram for Kratos::LoggerMessage:

Classes

class  DistributedFilter
 
class  MessageSource
 

Public Types

Enums
enum class  Severity {
  WARNING , INFO , DETAIL , DEBUG ,
  TRACE
}
 
enum class  Category {
  STATUS , CRITICAL , STATISTICS , PROFILING ,
  CHECKING
}
 
Type Definitions
using TimePointType = std::chrono::steady_clock::time_point
 

Public Member Functions

Life Cycle
 LoggerMessage (std::string const &TheLabel)
 
 LoggerMessage (LoggerMessage const &Other)
 
virtual ~LoggerMessage ()
 Destructor. More...
 
Operators
LoggerMessageoperator= (LoggerMessage const &Other)
 
Access
void SetLabel (std::string const &TheLabel)
 
std::string const & GetLabel () const
 
void SetMessage (std::string const &TheMessage)
 
std::string const & GetMessage () const
 
void SetLevel (std::size_t TheLevel)
 
std::size_t GetLevel () const
 
void SetLocation (CodeLocation const &TheLocation)
 
CodeLocation GetLocation () const
 
void SetSeverity (Severity const &TheSeverity)
 
Severity GetSeverity () const
 
void SetCategory (Category const &TheCategory)
 
Category GetCategory () const
 
bool IsDistributed () const
 
bool WriteInThisRank () const
 
int GetSourceRank () const
 
void SetTime ()
 
TimePointType const & GetTime () const
 
Input and output
virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 
template<class StreamValueType >
LoggerMessageoperator<< (StreamValueType const &rValue)
 string stream function More...
 
LoggerMessageoperator<< (std::ostream &(*pf)(std::ostream &))
 Manipulator stream function. More...
 
LoggerMessageoperator<< (const char *rString)
 char stream function More...
 
LoggerMessageoperator<< (CodeLocation const &TheLocation)
 Location stream function. More...
 
LoggerMessageoperator<< (Severity const &TheSeverity)
 Severity stream function. More...
 
LoggerMessageoperator<< (Category const &TheCategory)
 Category stream function. More...
 
LoggerMessageoperator<< (DistributedFilter const &TheMessageSource)
 DistributedFilter stream function. More...
 
LoggerMessageoperator<< (DataCommunicator const &TheDataCommunicator)
 DataCommunicator stream function. More...
 

Detailed Description

LoggerMessage class holdes message and the properties of the message.

LoggerMessage holds the origin of the message, severity, level and the category of it. Most of the methods are defined in header to be inlined in order to increase the performance.

Member Typedef Documentation

◆ TimePointType

using Kratos::LoggerMessage::TimePointType = std::chrono::steady_clock::time_point

Member Enumeration Documentation

◆ Category

Enumerator
STATUS 
CRITICAL 
STATISTICS 
PROFILING 
CHECKING 

◆ Severity

Enumerator
WARNING 
INFO 
DETAIL 
DEBUG 
TRACE 

Constructor & Destructor Documentation

◆ LoggerMessage() [1/2]

Kratos::LoggerMessage::LoggerMessage ( std::string const &  TheLabel)
inlineexplicit

◆ LoggerMessage() [2/2]

Kratos::LoggerMessage::LoggerMessage ( LoggerMessage const &  Other)
inline

◆ ~LoggerMessage()

virtual Kratos::LoggerMessage::~LoggerMessage ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ GetCategory()

Category Kratos::LoggerMessage::GetCategory ( ) const
inline

◆ GetLabel()

std::string const& Kratos::LoggerMessage::GetLabel ( ) const
inline

◆ GetLevel()

std::size_t Kratos::LoggerMessage::GetLevel ( ) const
inline

◆ GetLocation()

CodeLocation Kratos::LoggerMessage::GetLocation ( ) const
inline

◆ GetMessage()

std::string const& Kratos::LoggerMessage::GetMessage ( ) const
inline

◆ GetSeverity()

Severity Kratos::LoggerMessage::GetSeverity ( ) const
inline

◆ GetSourceRank()

int Kratos::LoggerMessage::GetSourceRank ( ) const
inline

◆ GetTime()

TimePointType const& Kratos::LoggerMessage::GetTime ( ) const
inline

◆ Info()

std::string Kratos::LoggerMessage::Info ( ) const
virtual

Turn back information as a string.

◆ IsDistributed()

bool Kratos::LoggerMessage::IsDistributed ( ) const
inline

◆ operator<<() [1/8]

LoggerMessage & Kratos::LoggerMessage::operator<< ( Category const &  TheCategory)

Category stream function.

◆ operator<<() [2/8]

LoggerMessage & Kratos::LoggerMessage::operator<< ( CodeLocation const &  TheLocation)

Location stream function.

◆ operator<<() [3/8]

LoggerMessage & Kratos::LoggerMessage::operator<< ( const char *  rString)

char stream function

◆ operator<<() [4/8]

LoggerMessage & Kratos::LoggerMessage::operator<< ( DataCommunicator const &  TheDataCommunicator)

DataCommunicator stream function.

◆ operator<<() [5/8]

LoggerMessage & Kratos::LoggerMessage::operator<< ( DistributedFilter const &  TheMessageSource)

DistributedFilter stream function.

◆ operator<<() [6/8]

LoggerMessage & Kratos::LoggerMessage::operator<< ( Severity const &  TheSeverity)

Severity stream function.

◆ operator<<() [7/8]

LoggerMessage & Kratos::LoggerMessage::operator<< ( std::ostream &(*)(std::ostream &)  pf)

Manipulator stream function.

◆ operator<<() [8/8]

template<class StreamValueType >
LoggerMessage& Kratos::LoggerMessage::operator<< ( StreamValueType const &  rValue)
inline

string stream function

◆ operator=()

LoggerMessage& Kratos::LoggerMessage::operator= ( LoggerMessage const &  Other)
inline

◆ PrintData()

void Kratos::LoggerMessage::PrintData ( std::ostream &  rOStream) const
virtual

Print object's data.

◆ PrintInfo()

void Kratos::LoggerMessage::PrintInfo ( std::ostream &  rOStream) const
virtual

Print information about this object.

◆ SetCategory()

void Kratos::LoggerMessage::SetCategory ( Category const &  TheCategory)
inline

◆ SetLabel()

void Kratos::LoggerMessage::SetLabel ( std::string const &  TheLabel)
inline

◆ SetLevel()

void Kratos::LoggerMessage::SetLevel ( std::size_t  TheLevel)
inline

◆ SetLocation()

void Kratos::LoggerMessage::SetLocation ( CodeLocation const &  TheLocation)
inline

◆ SetMessage()

void Kratos::LoggerMessage::SetMessage ( std::string const &  TheMessage)
inline

◆ SetSeverity()

void Kratos::LoggerMessage::SetSeverity ( Severity const &  TheSeverity)
inline

◆ SetTime()

void Kratos::LoggerMessage::SetTime ( )
inline

◆ WriteInThisRank()

bool Kratos::LoggerMessage::WriteInThisRank ( ) const
inline

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