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.
List of all members
Kratos::Logger Class Reference

Logger is in charge of writing the messages to output streams. More...

#include <logger.h>

Collaboration diagram for Kratos::Logger:

Public Types

Type Definitions
using LoggerOutputContainerType = std::vector< LoggerOutput::Pointer >
 
Enums
using Severity = LoggerMessage::Severity
 
using Category = LoggerMessage::Category
 
using DistributedFilter = LoggerMessage::DistributedFilter
 

Public Member Functions

Life Cycle
 Logger (std::string const &TheLabel)
 
 Logger ()
 
 Logger (Logger const &rOther)=delete
 Avoiding Logger to be copied. More...
 
virtual ~Logger ()
 Destructor is in charge of passing the message into outputs. More...
 
Operators
Loggeroperator= (Logger const &rOther)=delete
 Loggers can not be assigned. More...
 
Access
std::string const & GetCurrentMessage ()
 
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 >
Loggeroperator<< (StreamValueType const &rValue)
 string stream function More...
 
Loggeroperator<< (std::ostream &(*pf)(std::ostream &))
 Manipulator stream function. More...
 
Loggeroperator<< (const char *rString)
 char stream function More...
 
Loggeroperator<< (CodeLocation const &TheLocation)
 
Loggeroperator<< (Severity const &TheSeverity)
 Severity stream function. More...
 
Loggeroperator<< (Category const &TheCategory)
 Category stream function. More...
 

Static Public Member Functions

Static Methods
static LoggerOutputContainerTypeGetOutputsInstance ()
 
static LoggerOutputGetDefaultOutputInstance ()
 
static void AddOutput (LoggerOutput::Pointer pTheOutput)
 
static void RemoveOutput (LoggerOutput::Pointer pTheOutput)
 
static void Flush ()
 

Detailed Description

Logger is in charge of writing the messages to output streams.

Logger is the main class in message writing pipeline which holds an array of logger outputs and dispach the arriving logger messages to them. Implements a singletone for the list of the outputs and also has public constructors and destructors to perform the streaming.

Member Typedef Documentation

◆ Category

◆ DistributedFilter

◆ LoggerOutputContainerType

using Kratos::Logger::LoggerOutputContainerType = std::vector<LoggerOutput::Pointer>

◆ Severity

Constructor & Destructor Documentation

◆ Logger() [1/3]

Kratos::Logger::Logger ( std::string const &  TheLabel)
explicit

◆ Logger() [2/3]

Kratos::Logger::Logger ( )

◆ Logger() [3/3]

Kratos::Logger::Logger ( Logger const &  rOther)
delete

Avoiding Logger to be copied.

◆ ~Logger()

Kratos::Logger::~Logger ( )
virtual

Destructor is in charge of passing the message into outputs.

Member Function Documentation

◆ AddOutput()

void Kratos::Logger::AddOutput ( LoggerOutput::Pointer  pTheOutput)
static

◆ Flush()

void Kratos::Logger::Flush ( )
static

◆ GetCurrentMessage()

std::string const& Kratos::Logger::GetCurrentMessage ( )
inline

◆ GetDefaultOutputInstance()

static LoggerOutput& Kratos::Logger::GetDefaultOutputInstance ( )
inlinestatic

◆ GetOutputsInstance()

static LoggerOutputContainerType& Kratos::Logger::GetOutputsInstance ( )
inlinestatic

◆ Info()

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

Turn back information as a string.

◆ operator<<() [1/6]

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

Category stream function.

◆ operator<<() [2/6]

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

◆ operator<<() [3/6]

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

char stream function

◆ operator<<() [4/6]

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

Severity stream function.

◆ operator<<() [5/6]

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

Manipulator stream function.

◆ operator<<() [6/6]

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

string stream function

◆ operator=()

Logger& Kratos::Logger::operator= ( Logger const &  rOther)
delete

Loggers can not be assigned.

◆ PrintData()

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

Print object's data.

◆ PrintInfo()

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

Print information about this object.

◆ RemoveOutput()

void Kratos::Logger::RemoveOutput ( LoggerOutput::Pointer  pTheOutput)
static

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