v0.15.0
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
LogManager.hpp File Reference

Log and register warnings. More...

Go to the source code of this file.

Classes

struct  MoFEM::LogManager
 Log manager is used to build and partition problems. More...
 

Namespaces

namespace  MoFEM
 implementation of Data Operators for Forces and Sources
 
namespace  MoFEM::LogKeywords
 

Macros

#define MOFEM_LOG_CHANNEL(channel)    { MoFEM::LogManager::setLog(channel); }
 Set and reset channel.
 
#define MOFEM_LOG_ATTRIBUTES(channel, bit)    { MoFEM::LogManager::addAttributes(channel, bit); }
 Add attributes to channel.
 
#define MOFEM_LOG(channel, severity)    BOOST_LOG_SEV(MoFEM::LogManager::getLog(channel), severity)
 Log.
 
#define MOFEM_LOG_C(channel, severity, format, ...)
 
#define MOFEM_LOG_FUNCTION()
 Set scope.
 
#define MOFEM_LOG_TAG(channel, tag)   MoFEM::LogManager::addTag(channel, tag);
 Tag channel.
 
#define MOFEM_LOG_SYNCHRONISE(comm)    PetscSynchronizedFlush(comm, MoFEM::LogManager::dummy_mofem_fd);
 Synchronise "SYNC" channel.
 
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
 Synchronise "SYNC" on curtain severity level.
 
#define MOFEM_LOG_FILE_SYNCHRONISE(comm, fd)   PetscSynchronizedFlush(comm, fd);
 Synchronise "SYNC" channel.
 
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
 Tag and log in channel.
 
#define MOFEM_TAG_AND_LOG_C(channel, severity, tag, format, ...)
 Tag and log in channel.
 

Functions

std::ostream & MoFEM::operator<< (std::ostream &strm, const LogManager::SeverityLevel &level)
 
 MoFEM::LogKeywords::BOOST_LOG_ATTRIBUTE_KEYWORD (scope, "Scope", boost::log::attributes::named_scope::value_type) BOOST_LOG_ATTRIBUTE_KEYWORD(timeline
 
PetscErrorCode PetscVFPrintfDefault (FILE *fd, const char *format, va_list Argp)
 

Variables

 MoFEM::LogKeywords::Timeline
 

Detailed Description

Log and register warnings.

Definition in file LogManager.hpp.

Macro Definition Documentation

◆ MOFEM_LOG_C

#define MOFEM_LOG_C (   channel,
  severity,
  format,
  ... 
)
Value:
MOFEM_LOG(channel, severity) \
#define MOFEM_LOG(channel, severity)
Log.
static std::string getCLikeFormatedString(const char *fmt,...)
Converts formatted output to string.
Examples
ArcLengthExample.hpp, EshelbianPlasticity.cpp, NonlinearElasticElementInterface.hpp, NonlinearElasticExample.hpp, PlasticOpsMonitor.hpp, adolc_plasticity.cpp, eigen_elastic.cpp, elasticity.cpp, hanging_node_approx.cpp, hcurl_divergence_operator_2d.cpp, higher_derivatives.cpp, level_set.cpp, log.cpp, mesh_cut.cpp, mofem/atom_tests/child_and_parent.cpp, navier_stokes.cpp, nonlinear_dynamics.cpp, operators_tests.cpp, plastic.cpp, poisson_2d_dis_galerkin.cpp, tensor_divergence_operator.cpp, and test_broken_space.cpp.

Definition at line 319 of file LogManager.hpp.

360 { \
361 MOFEM_LOG_SYNCHRONISE(comm); \
362 return 0; \
363 })()
364
365 /**
366 * @brief Synchronise "SYNC" channel
367 *
368 */
369 #define MOFEM_LOG_FILE_SYNCHRONISE(comm, fd) PetscSynchronizedFlush(comm, fd);
370
371 /**
372 * @brief Tag and log in channel
373 *
374 */
375 #define MOFEM_TAG_AND_LOG(channel, severity, tag) \
376 MOFEM_LOG_TAG(channel, tag) \
377 MOFEM_LOG(channel, severity)
378
379 /**
380 * @brief Tag and log in channel
381 *
382 */
383 #define MOFEM_TAG_AND_LOG_C(channel, severity, tag, format, ...) \
384 MOFEM_LOG_TAG(channel, tag) \
385 MOFEM_LOG_C(channel, severity, format, __VA_ARGS__)
386
387#endif //__LOGMANAGER_HPP__
388
389/**
390 * \defgroup mofem_log_manager
391 * \brief Log manager
392 *
393 * Logging manager based on Boost.Log
394 * (<a
395 * href="https://www.boost.org/doc/libs/1_63_0/libs/log/doc/html/index.html">Boost.Log
396 * v2</a>)
397 *
398 * \ingroup mofem
399 */

◆ MOFEM_LOG_FILE_SYNCHRONISE

#define MOFEM_LOG_FILE_SYNCHRONISE (   comm,
  fd 
)    PetscSynchronizedFlush(comm, fd);

Synchronise "SYNC" channel.

Examples
log.cpp.

Definition at line 370 of file LogManager.hpp.

◆ MOFEM_LOG_SEVERITY_SYNC

#define MOFEM_LOG_SEVERITY_SYNC (   comm,
  severity 
)
Value:
MOFEM_LOG("NULL", severity) << ([&] { \
MOFEM_LOG_SYNCHRONISE(comm); \
return 0; \
})()

Synchronise "SYNC" on curtain severity level.

Examples
EshelbianPlasticity.cpp, PlasticOpsMonitor.hpp, dynamic_first_order_con_law.cpp, free_surface.cpp, seepage.cpp, simple_interface.cpp, and thermo_elastic.cpp.

Definition at line 360 of file LogManager.hpp.

361 { \
362 MOFEM_LOG_SYNCHRONISE(comm); \
363 return 0; \
364 })()

◆ MOFEM_LOG_SYNCHRONISE

#define MOFEM_LOG_SYNCHRONISE (   comm)     PetscSynchronizedFlush(comm, MoFEM::LogManager::dummy_mofem_fd);

◆ MOFEM_TAG_AND_LOG

#define MOFEM_TAG_AND_LOG (   channel,
  severity,
  tag 
)
Value:
MOFEM_LOG_TAG(channel, tag) \
MOFEM_LOG(channel, severity)
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.

Tag and log in channel.

Examples
ADOLCPlasticityMaterialModels.hpp, HenckyOps.hpp, NonlinearElasticExample.hpp, PlasticOps.hpp, ThermoElasticOps.hpp, adolc_plasticity.cpp, free_surface.cpp, partition_mesh.cpp, poisson_2d_homogeneous.cpp, schur_test_diag_mat.cpp, seepage.cpp, and thermo_elastic.cpp.

Definition at line 376 of file LogManager.hpp.

◆ MOFEM_TAG_AND_LOG_C

#define MOFEM_TAG_AND_LOG_C (   channel,
  severity,
  tag,
  format,
  ... 
)
Value:
MOFEM_LOG_TAG(channel, tag) \
MOFEM_LOG_C(channel, severity, format, __VA_ARGS__)

Tag and log in channel.

Definition at line 384 of file LogManager.hpp.

Function Documentation

◆ PetscVFPrintfDefault()

PetscErrorCode PetscVFPrintfDefault ( FILE *  fd,
const char *  format,
va_list  Argp 
)