proxygen
folly::TestLogWriter Class Reference
Inheritance diagram for folly::TestLogWriter:
folly::LogWriter

Public Member Functions

void writeMessage (folly::StringPiece, uint32_t=0) override
 
void flush () override
 
bool ttyOutput () const override
 
- Public Member Functions inherited from folly::LogWriter
virtual ~LogWriter ()
 
virtual void writeMessage (std::string &&buffer, uint32_t flags=0)
 

Public Attributes

int flushed_messages_count {0}
 
int unflushed_messages_count {0}
 

Additional Inherited Members

- Public Types inherited from folly::LogWriter
enum  Flags : uint32_t { NO_FLAGS = 0x00, NEVER_DISCARD = 0x01 }
 

Detailed Description

Definition at line 31 of file SyncLevelTest.cpp.

Member Function Documentation

void folly::TestLogWriter::flush ( )
inlineoverridevirtual

Block until all messages that have already been sent to this LogWriter have been written.

Other threads may still call writeMessage() while flush() is running. writeMessage() calls that did not complete before the flush() call started will not necessarily be processed by the flush call.

Implements folly::LogWriter.

Definition at line 38 of file SyncLevelTest.cpp.

References flushed_messages_count, and unflushed_messages_count.

bool folly::TestLogWriter::ttyOutput ( ) const
inlineoverridevirtual

Is the log writer writing to a tty or not.

Implements folly::LogWriter.

Definition at line 46 of file SyncLevelTest.cpp.

46  {
47  return false;
48  }
void folly::TestLogWriter::writeMessage ( folly::StringPiece  buffer,
uint32_t  flags = 0 
)
inlineoverridevirtual

Write a serialized log message.

The flags parameter is a bitwise-ORed set of Flag values defined above.

Implements folly::LogWriter.

Definition at line 33 of file SyncLevelTest.cpp.

References unflushed_messages_count.

34  {
36  }

Member Data Documentation

int folly::TestLogWriter::flushed_messages_count {0}

Definition at line 43 of file SyncLevelTest.cpp.

Referenced by flush().

int folly::TestLogWriter::unflushed_messages_count {0}

Definition at line 44 of file SyncLevelTest.cpp.

Referenced by flush(), and writeMessage().


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