#include <jrl-qp/utils/Logger.h>
|
| | Logger (std::ostream &os, std::string name, std::uint32_t flags=0) |
| |
| Logger & | setFlag (std::uint32_t flag, bool add=true) |
| |
| Logger & | setOutputStream (std::ostream &os) |
| |
| template<typename... Args> |
| void | comment (std::uint32_t flag, Args &&... args) const |
| |
| void | startIter (int i) |
| |
| template<typename... Args> |
| void | log (std::uint32_t flag, Args &&... args) const |
| |
| Logger | subLog (const std::string &name) const |
| |
| int | iter () const |
| |
Class for logging data in a Matlab-compatible way, with a filter based on a system of binary flags.
◆ Logger()
| jrl::qp::utils::Logger::Logger |
( |
std::ostream & |
os, |
|
|
std::string |
name, |
|
|
std::uint32_t |
flags = 0 |
|
) |
| |
|
inline |
- Parameters
-
| os | Stream where the data will be logged. |
| name | Name of the Matlab struct that will record the data. |
| flags | Flag for which the logger will effectively output something. |
◆ comment()
template<typename... Args>
| void jrl::qp::utils::Logger::comment |
( |
std::uint32_t |
flag, |
|
|
Args &&... |
args |
|
) |
| const |
|
inline |
Log a comment c, if flag pass the filter.
◆ iter()
| int jrl::qp::utils::Logger::iter |
( |
| ) |
const |
|
inline |
Current iteration number.
◆ log()
template<typename... Args>
| void jrl::qp::utils::Logger::log |
( |
std::uint32_t |
flag, |
|
|
Args &&... |
args |
|
) |
| const |
|
inline |
Log a given number of values.
- Parameters
-
| flag | Flag(s) for which the values should be logged. |
| args | Sequence of pairs (name, value). |
◆ setFlag()
| Logger & jrl::qp::utils::Logger::setFlag |
( |
std::uint32_t |
flag, |
|
|
bool |
add = true |
|
) |
| |
Add or remove one or several (aggregated) flags to filter the data to log. If add is true, flag is added with a "or". If false, it is removed with a "and not".
◆ setOutputStream()
| Logger & jrl::qp::utils::Logger::setOutputStream |
( |
std::ostream & |
os | ) |
|
◆ startIter()
| void jrl::qp::utils::Logger::startIter |
( |
int |
i | ) |
|
Indicate that a new iteration of the solver is starting.
◆ subLog()
| Logger jrl::qp::utils::Logger::subLog |
( |
const std::string & |
name | ) |
const |
Return a sub-logger. It will act as a struct with data for the current iteration of its parent log.
The documentation for this class was generated from the following files: