|
void | enableIndentation () override final |
|
void | disableIndentation () override final |
|
void | enablePrintPercentage () override final |
|
void | disablePrintPercentage () override final |
|
void | setPrintLevel (LogLevel) override final |
| Sets the maximum print level of the logger.
|
|
void | enablePrintMessageDuringProgress () override final |
|
void | disablePrintMessageDuringProgress () override final |
|
void | enablePrintTimer () override final |
|
void | disablePrintTimer () override final |
|
void | reset () override final |
|
void | setMaxLineWidth (uint) override final |
|
void | startTimer () override final |
|
void | stopTimer () override final |
|
double | time () const override final |
| Returns the time passed since the last call to startTimer member function, or the time passed between the call to startTimer and the call to stopTimer member functions. The time is expressed in seconds.
|
|
void | startNewTask (double, double, const std::string &) override final |
|
void | endTask (const std::string &) override final |
|
double | percentage () const override final |
|
void | setPercentage (uint) override final |
|
void | log (const std::string &) const override final |
| Prints a message to the logger, with level LogLevel::PROGRESS and without modifying the current percentage.
|
|
void | log (const std::string &, LogLevel) const override final |
| Prints a message to the logger, with the given level and without modifying the current percentage.
|
|
void | log (uint, const std::string &) override final |
| Prints a message to the logger, with the level LogLevel::PROGRESS and with the given percentage.
|
|
void | log (uint, const std::string &, LogLevel) override final |
| Prints a message to the logger, with the given level and with the given percentage.
|
|
void | startProgress (const std::string &, uint, uint=0, uint=0, uint=0) override final |
| Allows to easily manage progresses with the logger, along with the progress and endProgress member functions.
|
|
void | endProgress () override final |
| Allows to easily manage progresses with the logger, along with the startProgress and progress member functions.
|
|
void | progress (uint) override final |
| Allows to easily manage progresses with the logger, along with the startProgress and endProgress member functions.
|
|
The NullLogger class is used as default type in all the library functions that take as input a logger type.
This class satisfies the LoggerConcept, and just does nothing in all its member functions.
void vcl::NullLogger::endProgress |
( |
| ) |
|
|
inlinefinaloverridevirtual |
Allows to easily manage progresses with the logger, along with the startProgress
and progress
member functions.
This logger functionality should be used when processing a loop having a fixed size, with regular prints of the progress.
This member function ends the current progress.
The typical usage is the following:
log.startProgress(
"Computing...", s);
for (uint
i = 0;
i <
vec.size(); ++
i) {
}
void log(const std::string &) const override final
Prints a message to the logger, with level LogLevel::PROGRESS and without modifying the current perce...
Definition null_logger.h:84
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Implements vcl::AbstractLogger.
void vcl::NullLogger::progress |
( |
uint |
n | ) |
|
|
inlinefinaloverridevirtual |
Allows to easily manage progresses with the logger, along with the startProgress
and endProgress
member functions.
This logger functionality should be used when processing a loop having a fixed size, with regular prints of the progress.
This member functions increments the current progress. Only if the current percentage reaches a new step percentage (set in the startProgress
member function), a message will be printed by the logger.
The typical usage is the following:
log.startProgress(
"Computing...", s);
for (uint
i = 0;
i <
vec.size(); ++
i) {
}
- Parameters
-
[in] | n | iteration number of the current progress. It must be less than the progressSize argument of the startProgress member function. |
Implements vcl::AbstractLogger.
void vcl::NullLogger::setPrintLevel |
( |
LogLevel |
level | ) |
|
|
inlinefinaloverridevirtual |
Sets the maximum print level of the logger.
Only messages with a level less or equal to the given level will be printed. For example, if the level is set to LogLevel::MESSAGE
, only messages with level LogLevel::ERROR
, LogLevel::WARNING
and LogLevel::MESSAGE
will be printed.
- Note
- The default level is
LogLevel::PROGRESS
.
- Parameters
-
[in] | level | The maximum print level of the logger. |
Implements vcl::AbstractLogger.
void vcl::NullLogger::startProgress |
( |
const std::string & |
msg, |
|
|
uint |
progressSize, |
|
|
uint |
percPrintProgress = 0 , |
|
|
uint |
startPerc = 0 , |
|
|
uint |
endPerc = 0 |
|
) |
| |
|
inlinefinaloverridevirtual |
Allows to easily manage progresses with the logger, along with the progress
and endProgress
member functions.
This logger functionality should be used when processing a loop having a fixed size, with regular prints of the progress.
This member function starts a new progress. With the default arguments, will print a message from 0% to 100%, every 10%.
The typical usage is the following:
log.startProgress(
"Computing...",
vec.size());
for (uint
i = 0;
i <
vec.size(); ++
i) {
}
- Parameters
-
[in] | msg | the message that will be printed during the progress |
[in] | progressSize | the number of iterations made during the progress |
[in] | percPrintProgress | interval of percentage on which print a progress message, default 10% |
[in] | startPerc | start percentage of the progress, default 0% |
[in] | endPerc | end percentage of the progress, default 100% |
Implements vcl::AbstractLogger.