IMP logo
IMP Reference Guide  develop.cb469e0f11,2024/05/29
The Integrative Modeling Platform
log.h File Reference

Logging and error reporting support. More...

#include <IMP/kernel_config.h>
#include "enums.h"
#include "WarningContext.h"
#include "Flag.h"
#include <string>
+ Include dependency graph for log.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


 Base functionality and abstract base classes for representation, scoring and sampling.


IMP provides tools for controlling the amount of log output produced and directing it to the terminal or a file. Only log messages tagged with a lower level than the current LogLevel are emitted. In addition to a global log level (get_log_level(), set_log_level()), each IMP::Object has an internal log level (IMP::Object::get_log_level(), IMP::Object::set_log_level()) which is used when executing code on that object.

Logging is provided by IMP/log.h.

People implementing IMP::Object classes should also see IMP_OBJECT_LOG() and IMP::SetLogState.

All logging is disabled when IMP is built using build='fast'.

void IMP::add_to_log (LogLevel level, std::string to_write)
 Write a string to the log, for Python. More...
void IMP::set_log_level (LogLevel l)
 Set the current global log level. More...
void IMP::set_log_timer (bool tb)
 Set whether log messages are tagged with the current log time. More...
void IMP::reset_log_timer ()
 Reset the log timer. More...
LogLevel IMP::get_log_level ()
 Get the currently active global log level. More...

Create a progress bar in the terminal

void IMP::set_progress_display (std::string description, unsigned int steps)
 Set up the progress bar with the passed description. More...
void IMP::add_to_progress_display (unsigned int step=1)
 Set the current progress. More...

Detailed Description

Logging and error reporting support.

Copyright 2007-2022 IMP Inventors. All rights reserved.

Definition in file log.h.