![]() |
v0.15.0 |
Log manager is used to build and partition problems. More...
#include "src/interfaces/LogManager.hpp"
Classes | |
| struct | InternalData |
Public Types | |
| enum | SeverityLevel { noisy , verbose , inform , warning , error } |
| Severity levels. More... | |
| enum | LogAttributesBits { BitLineID = 1 << 0 , BitScope = 1 << 1 } |
| Tag attributes switches. More... | |
| typedef boost::log::sources::severity_channel_logger< SeverityLevel, std::string > | LoggerType |
| Definition of the channel logger. | |
| typedef sinks::synchronous_sink< sinks::text_ostream_backend > | SinkType |
Public Member Functions | |
| MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
| LogManager (const MoFEM::Core &core) | |
| virtual | ~LogManager ()=default |
Public Member Functions inherited from MoFEM::UnknownInterface | |
| template<class IFACE > | |
| MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
| Register interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE *&iface) const |
| Get interface reference to pointer of interface. | |
| template<class IFACE > | |
| MoFEMErrorCode | getInterface (IFACE **const iface) const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get interface pointer to pointer of interface. | |
| template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
| IFACE | getInterface () const |
| Get reference to interface. | |
| template<class IFACE > | |
| IFACE * | getInterface () const |
| Function returning pointer to interface. | |
| virtual | ~UnknownInterface ()=default |
Static Public Member Functions | |
| static void | addAttributes (LogManager::LoggerType &lg, const int bit=0) |
| Add attributes to logger. | |
| static void | addAttributes (const std::string channel, const int bit=0) |
| Add attributes to channel. | |
| static LoggerType & | setLog (const std::string channel) |
| Set ans resset chanel logger. | |
| static LoggerType & | getLog (const std::string channel) |
| Get logger by channel. | |
| static bool | checkIfChannelExist (const std::string channel) |
| Check if channel exist. | |
| static void | addTag (LogManager::LoggerType &lg, const std::string tag) |
| Add tag to logger. | |
| static void | addTag (const std::string channel, const std::string tag) |
| Add tag to channel. | |
| static boost::shared_ptr< std::ostream > | getStrmSelf () |
| Get the strm self object. | |
| static boost::shared_ptr< std::ostream > | getStrmWorld () |
| Get the strm world object. | |
| static boost::shared_ptr< std::ostream > | getStrmSync () |
| Get the strm sync object. | |
| static boost::shared_ptr< std::ostream > | getStrmNull () |
| Get the strm null object. | |
| static boost::shared_ptr< std::ostream > | getStrmSync (MPI_Comm comm, FILE *fd) |
| Get the strm sync object. | |
| static boost::shared_ptr< SinkType > | createSink (boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter) |
| Create a sink object. | |
| static void | createDefaultSinks (MPI_Comm comm) |
| Create default sinks. | |
| static MoFEMErrorCode | getOptions () |
| Get logger option. | |
| static PetscErrorCode | logPetscFPrintf (FILE *fd, const char format[], va_list Argp) |
| Use to handle PETSc output. | |
| static std::string | getVLikeFormatedString (const char *fmt, va_list args) |
| Converts formatted output to string. | |
| static std::string | getCLikeFormatedString (const char *fmt,...) |
| Converts formatted output to string. | |
| static void | recordFormatterDefault (logging::record_view const &rec, logging::formatting_ostream &strm) |
| Default record formatter. | |
Static Public Member Functions inherited from MoFEM::UnknownInterface | |
| static MoFEMErrorCode | getLibVersion (Version &version) |
| Get library version. | |
| static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
| Get database major version. | |
| static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
| Get database major version. | |
| static MoFEMErrorCode | getInterfaceVersion (Version &version) |
| Get database major version. | |
Static Public Attributes | |
| static constexpr std::array< char *const, error+1 > | severityStrings |
| static FILE * | dummy_mofem_fd = (FILE *)&dummy_file |
| Dummy file pointer (DO NOT USE) | |
Private Attributes | |
| MoFEM::Core & | cOre |
Static Private Attributes | |
| static boost::shared_ptr< InternalData > | internalDataPtr |
| static std::string | petscStringCache = std::string() |
Log manager is used to build and partition problems.
Definition at line 26 of file LogManager.hpp.
| typedef boost::log::sources::severity_channel_logger<SeverityLevel, std::string> MoFEM::LogManager::LoggerType |
Definition of the channel logger.
Definition at line 64 of file LogManager.hpp.
| typedef sinks::synchronous_sink<sinks::text_ostream_backend> MoFEM::LogManager::SinkType |
Definition at line 66 of file LogManager.hpp.
| MoFEM::LogManager::LogManager | ( | const MoFEM::Core & | core | ) |
Definition at line 138 of file LogManager.cpp.
|
virtualdefault |
|
static |
Check if channel exist.
| channel |
Definition at line 407 of file LogManager.cpp.
|
static |
Create default sinks.
Definition at line 308 of file LogManager.cpp.
|
static |
Create a sink object.
| stream_ptr | |
| comm_filter |
Definition at line 293 of file LogManager.cpp.
|
static |
Converts formatted output to string.
| fmt | |
| args |
Definition at line 474 of file LogManager.cpp.
|
static |
Get logger option.
This function is called by MoFEM core when this interface is registred into database.
Definition at line 149 of file LogManager.cpp.
|
static |
Get the strm null object.
Definition at line 347 of file LogManager.cpp.
|
static |
Get the strm self object.
Definition at line 335 of file LogManager.cpp.
|
static |
Get the strm sync object.
Definition at line 343 of file LogManager.cpp.
|
static |
Get the strm sync object.
| comm | |
| fd |
Definition at line 351 of file LogManager.cpp.
|
static |
Get the strm world object.
Definition at line 339 of file LogManager.cpp.
|
static |
Converts formatted output to string.
| fmt | |
| args |
Definition at line 468 of file LogManager.cpp.
|
static |
Use to handle PETSc output.
| fd | |
| format | |
| Argp |
Definition at line 414 of file LogManager.cpp.
|
virtual |
Implements MoFEM::UnknownInterface.
Definition at line 142 of file LogManager.cpp.
|
static |
Default record formatter.
| rec | |
| strm |
Definition at line 200 of file LogManager.cpp.
|
private |
Definition at line 243 of file LogManager.hpp.
|
static |
Dummy file pointer (DO NOT USE)
Definition at line 200 of file LogManager.hpp.
|
staticprivate |
Definition at line 246 of file LogManager.hpp.
|
staticprivate |
Definition at line 248 of file LogManager.hpp.
|
inlinestaticconstexpr |
Definition at line 35 of file LogManager.hpp.