proxygen
Logging.h File Reference
#include <folly/Optional.h>
#include <folly/io/IOBuf.h>
#include <sstream>
#include <string>

Go to the source code of this file.

Classes

class  proxygen::NullStream
 
class  proxygen::StackTracePrinterWithException< T >
 
class  proxygen::IOBufPrinter
 
class  proxygen::Hex16Printer
 
class  proxygen::HexFollyPrinter
 
class  proxygen::ChainInfoPrinter
 
class  proxygen::BinPrinter
 

Namespaces

 proxygen
 
 proxygen::logging_details
 

Macros

#define CHECK_LOG_AND_THROW(CONDITION, LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_LT(X, Y, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) < (Y), LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_LE(X, Y, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) <= (Y), LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_GT(X, Y, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) > (Y), LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_GE(X, Y, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) >= (Y), LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_EQ(X, Y, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) == (Y), LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_NE(X, Y, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) != (Y), LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_NOT_NULL(X, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) != nullptr, LOG_LEVEL, EXCEPTION)
 
#define CHECK_LOG_AND_THROW_NULL(X, LOG_LEVEL, EXCEPTION)   CHECK_LOG_AND_THROW((X) == nullptr, LOG_LEVEL, EXCEPTION)
 

Functions

std::string proxygen::logging_details::getStackTrace ()
 
template<class T >
NullStream & proxygen::operator<< (NullStream &ns, const T &)
 
void proxygen::dumpBinToFile (const string &filename, const IOBuf *buf)
 
std::string proxygen::hexStr (folly::StringPiece sp)
 

Macro Definition Documentation

#define CHECK_LOG_AND_THROW (   CONDITION,
  LOG_LEVEL,
  EXCEPTION 
)
Value:
(StackTracePrinterWithException<EXCEPTION>( \
(CONDITION), \
"Check failed \"" #CONDITION "\": ", \
__FILE__, \
__LINE__, \
google::GLOG_##LOG_LEVEL)).stream()
StreamCodecFactory stream

Definition at line 82 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_EQ (   X,
  Y,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) == (Y), LOG_LEVEL, EXCEPTION)

Definition at line 102 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_GE (   X,
  Y,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) >= (Y), LOG_LEVEL, EXCEPTION)

Definition at line 99 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_GT (   X,
  Y,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) > (Y), LOG_LEVEL, EXCEPTION)

Definition at line 96 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_LE (   X,
  Y,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) <= (Y), LOG_LEVEL, EXCEPTION)

Definition at line 93 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_LT (   X,
  Y,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) < (Y), LOG_LEVEL, EXCEPTION)

Definition at line 90 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_NE (   X,
  Y,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) != (Y), LOG_LEVEL, EXCEPTION)

Definition at line 105 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_NOT_NULL (   X,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) != nullptr, LOG_LEVEL, EXCEPTION)

Definition at line 108 of file Logging.h.

Referenced by TEST_F().

#define CHECK_LOG_AND_THROW_NULL (   X,
  LOG_LEVEL,
  EXCEPTION 
)    CHECK_LOG_AND_THROW((X) == nullptr, LOG_LEVEL, EXCEPTION)

Definition at line 111 of file Logging.h.

Referenced by TEST_F().