class Logger

Defined at line 18 of file ../../src/virtualization/tests/lib/logger.h

Logger is a singleton class that GuestConsole uses to write the guest's logs

to. Then a test listener outputs the buffer if a test fails.

Thread safe.

Public Members

static const bool kLogAllGuestOutput

Public Methods

Logger & Get ()

Defined at line 10 of file ../../src/virtualization/tests/lib/logger.cc

void Write (std::string_view buffer)

Append the given string to the log.

Defined at line 26 of file ../../src/virtualization/tests/lib/logger.h

void Reset ()

Clear the log.

Defined at line 28 of file ../../src/virtualization/tests/lib/logger.cc

void WriteLine (std::string_view buffer)

Append the given string to the log, appending a newline character.

Defined at line 29 of file ../../src/virtualization/tests/lib/logger.h

std::string Buffer ()

Return a copy of the current log.

Defined at line 33 of file ../../src/virtualization/tests/lib/logger.cc