Celeritas
0.5.0-56+6b053cd
|
#include "Logger.hh"
#include <algorithm>
#include <functional>
#include <iostream>
#include <mutex>
#include <sstream>
#include <string>
#include "corecel/Assert.hh"
#include "corecel/cont/Range.hh"
#include "corecel/sys/Environment.hh"
#include "corecel/sys/MpiCommunicator.hh"
#include "corecel/sys/ScopedMpiInit.hh"
#include "ColorUtils.hh"
#include "LoggerTypes.hh"
Functions | |
LogLevel | celeritas::log_level_from_env (std::string const &level_env) |
Get the log level from an environment variable. More... | |
LogLevel | celeritas::log_level_from_env (std::string const &level_env, LogLevel default_lev) |
Get the log level from an environment variable. | |
Logger | celeritas::make_default_world_logger () |
Create a default logger using the world communicator. More... | |
Logger | celeritas::make_default_self_logger () |
Create a default logger using the local communicator. More... | |
Logger & | celeritas::world_logger () |
Parallel-enabled logger: print only on "main" process. More... | |
Logger & | celeritas::self_logger () |
Serial logger: print on every process that calls it. More... | |
LogLevel celeritas::log_level_from_env | ( | std::string const & | level_env | ) |
Get the log level from an environment variable.
Default to Logger::default_level
, which is 'info'.
Logger celeritas::make_default_self_logger | ( | ) |
Create a default logger using the local communicator.
If MPI is enabled, this will prepend the local process index to the message.
Logger celeritas::make_default_world_logger | ( | ) |
Create a default logger using the world communicator.
The result prints only on one processor in the world communicator group. This function can be useful when resetting a test harness.
Logger & celeritas::self_logger | ( | ) |
Serial logger: print on every process that calls it.
Setting the "CELER_LOG_LOCAL" environment variable to "debug", "info", "error", etc. will change the default log level.
Logger & celeritas::world_logger | ( | ) |
Parallel-enabled logger: print only on "main" process.
Setting the "CELER_LOG" environment variable to "debug", "info", "error", etc. will change the default log level.