10#define IMPKERNEL_LOG_H
12#include <IMP/kernel_config.h>
17#if IMP_KERNEL_HAS_LOG4CXX
18#include <log4cxx/logger.h>
21IMPKERNEL_BEGIN_NAMESPACE
23#if !defined(SWIG) && !defined(IMP_DOXYGEN)
25extern IMPKERNELEXPORT Flag<LogLevel, IMP_HAS_LOG != IMP_SILENT> log_level;
48#if !IMP_KERNEL_HAS_LOG4CXX
52IMPKERNELEXPORT
void push_log_context(
const char *functionname,
56IMPKERNELEXPORT
void pop_log_context();
59IMPKERNELEXPORT
void add_to_log(std::string to_write);
94#if IMP_KERNEL_HAS_LOG4CXX
95inline log4cxx::LoggerPtr get_logger() {
96 static log4cxx::LoggerPtr ret = log4cxx::Logger::getLogger(
"IMP");
100#if !defined(IMP_DOXYGEN) && !defined(SWIG)
101inline bool get_is_log_output(LogLevel l) {
return l <=
get_log_level(); }
123IMPKERNEL_END_NAMESPACE
Utility classes to add command line flags.
Group warnings so they can be output together.
Basic enumeration types used by IMP.
void set_log_level(LogLevel l)
Set the current global log level.
void set_log_timer(bool tb)
Set whether log messages are tagged with the current log time.
void add_to_progress_display(unsigned int step=1)
Set the current progress.
void set_progress_display(std::string description, unsigned int steps)
Set up the progress bar with the passed description.
void reset_log_timer()
Reset the log timer.
LogLevel get_log_level()
Get the currently active global log level.
LogLevel
The log levels supported by IMP.
void add_to_log(LogLevel level, std::string to_write)
Write a string to the log, for Python.