OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
Public Member Functions | Static Public Member Functions | List of all members
InternalZGY::Logger Class Reference

#include <logger.h>

Inheritance diagram for InternalZGY::Logger:
InternalZGY::LoggerBase

Public Member Functions

const LoggerFn & getCallback () const
 
void setCallback (const LoggerFn &callback)
 
void setCallback (int currentlevel)
 

Static Public Member Functions

static Loggerinstance ()
 
static const LoggerFn & getForwarder ()
 
- Static Public Member Functions inherited from InternalZGY::LoggerBase
static int getVerboseFromEnv (const char *envname)
 
static bool logger (const LoggerFn &logger, int priority, const std::string &str=std::string())
 
static bool logger (const LoggerFn &logger, int priority, const std::ios &ss)
 
static LoggerFn emptyCallback ()
 
static LoggerFn standardCallback (int level, const std::string &prefix, const std::string &suffix)
 

Additional Inherited Members

- Public Types inherited from InternalZGY::LoggerBase
typedef std::function< bool(int, const std::string &)> LoggerFn
 

Detailed Description

Global singleton logging function.

See LoggerBase for explanation of the logger framework.

Member Function Documentation

◆ getCallback()

const Logger::LoggerFn & InternalZGY::Logger::getCallback ( ) const

Return the callback to be invoked when logging.

◆ getForwarder()

const Logger::LoggerFn & InternalZGY::Logger::getForwarder ( )
static

Return the callback to be invoked when logging, with an extra level of indirection. This will look up the global singleton on each use. If you are going to store a copy of the logger for a while, the difference between getCallback() and getForwarder() is that the former uses the logger that was in force when the copy was made. For short lived use, always prefer getCallback() because it is more performant.


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