Sha256: 38bc611c65cdf5a6136798c25320dbe3658967d05ce6e57e893e9d1fed846eef
Contents?: true
Size: 803 Bytes
Versions: 16
Compression:
Stored size: 803 Bytes
Contents
#pragma once #include <sstream> #include <string> #include <facter/logging/logging.hpp> namespace facter { namespace testing { /** * Utility class for capturing facter log output. */ struct log_capture { /** * Constructs the log capture and starts capturing log output. * @param level The log level to capture. */ explicit log_capture(facter::logging::level level); /** * Destructs the log capture and stops capturing log output. */ ~log_capture(); /** * Gets the captured log. * @return Returns the captured log as a single string. */ std::string result() const; private: std::ostringstream _stream; }; }} // namespace facter::testing
Version data entries
16 entries across 16 versions & 2 rubygems