1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #ifndef _FASTDDS_FILE_CONSUMER_HPP_
- #define _FASTDDS_FILE_CONSUMER_HPP_
- #include <fastdds/dds/log/Log.hpp>
- #include <fstream>
- namespace eprosima {
- namespace fastdds {
- namespace dds {
- class FileConsumer : public LogConsumer
- {
- public:
-
- RTPS_DllAPI FileConsumer();
-
- RTPS_DllAPI FileConsumer(
- const std::string& filename,
- bool append = false);
-
- RTPS_DllAPI virtual void Consume(
- const Log::Entry&);
- virtual ~FileConsumer();
- private:
- void print_header(
- const Log::Entry&);
- void print_context(
- const Log::Entry&);
- std::string output_file_;
- std::ofstream file_;
- bool append_;
- };
- }
- }
- }
- #endif
|