HighFive 2.10.0
HighFive - Header-only C++ HDF5 interface
Loading...
Searching...
No Matches
HighFive::Logger Class Reference

A logger with supporting basic functionality. More...

#include <H5Utility.hpp>

Public Types

using callback_type
 

Public Member Functions

 Logger ()=delete
 
 Logger (const Logger &)=delete
 
 Logger (Logger &&)=delete
 
 Logger (callback_type cb)
 
Loggeroperator= (const Logger &)=delete
 
Loggeroperator= (Logger &&)=delete
 
void log (LogSeverity severity, const std::string &message, const std::string &file, int line)
 
void set_logging_callback (callback_type cb)
 

Detailed Description

A logger with supporting basic functionality.

This logger delegates the logging task to a callback. This level of indirection enables using the default Python logger from C++; or integrating HighFive into some custom logging solution.

Using this class directly to log is not intended. Rather you should use

  • HIGHFIVE_LOG_DEBUG{,_IF}
  • HIGHFIVE_LOG_INFO{,_IF}
  • HIGHFIVE_LOG_WARNING{,_IF}
  • HIGHFIVE_LOG_ERROR{,_IF}

This is intended to used as a singleton, via get_global_logger().

Member Typedef Documentation

◆ callback_type

Initial value:
std::function<void(LogSeverity, const std::string&, const std::string&, int)>
LogSeverity
Definition H5Utility.hpp:53

Constructor & Destructor Documentation

◆ Logger() [1/4]

HighFive::Logger::Logger ( )
delete

◆ Logger() [2/4]

HighFive::Logger::Logger ( const Logger & )
delete

◆ Logger() [3/4]

HighFive::Logger::Logger ( Logger && )
delete

◆ Logger() [4/4]

HighFive::Logger::Logger ( callback_type cb)
inlineexplicit

Member Function Documentation

◆ log()

void HighFive::Logger::log ( LogSeverity severity,
const std::string & message,
const std::string & file,
int line )
inline

◆ operator=() [1/2]

Logger & HighFive::Logger::operator= ( const Logger & )
delete

◆ operator=() [2/2]

Logger & HighFive::Logger::operator= ( Logger && )
delete

◆ set_logging_callback()

void HighFive::Logger::set_logging_callback ( callback_type cb)
inline

The documentation for this class was generated from the following file: