Class Loggable

Synopsis

#include <src/easylogging++.h>

class Loggable

Description

Base of Easylogging++ friendly class.

@detail After inheriting this class publicly, implement pure-virtual function void log(std::ostream&) const

Mentioned in

Inheritance

Decsendents: LogFormat, PerformanceTracker, Logger, Configuration

Methods

~Loggable
log

Source

Lines 1567-1576 in src/easylogging++.h.

class Loggable {
 public:
  virtual ~Loggable(void) {}
  virtual void log(el::base::type::ostream_t&) const = 0;
 private:
  friend inline el::base::type::ostream_t& operator<<(el::base::type::ostream_t& os, const Loggable& loggable) {
    loggable.log(os);
    return os;
  }
};





Add Discussion

Log in to comment