MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / test_change_log_file

Function test_change_log_file

tests/basic/test-logger.cpp:101–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 void test_change_log_file( const std::string &huge_msg )
102 {
103 geode::Logger::info( "==============================" );
104 geode::Logger::info( "TEST CHANGE LOG FILE" );
105 geode::Logger::info( "==============================" );
106
107 static constexpr auto FILENAME1 = "first.log";
108 auto file_logger =
109 std::make_unique< geode::FileLoggerClient >( FILENAME1 );
110 auto &registered_file_logger =
111 dynamic_cast< geode::FileLoggerClient & >(
112 geode::LoggerManager::register_client(
113 std::move( file_logger ) ) );
114 geode::Logger::info(
115 absl::StrCat( "Message written in first.log", "\n", huge_msg ) );
116 static constexpr auto FILENAME2 = "second.log";
117 registered_file_logger.set_file_path( FILENAME2 );
118 geode::Logger::info(
119 absl::StrCat( "Message written in second.log", "\n", huge_msg ) );
120 }
121
122 void test()
123 {

Callers 1

testFunction · 0.85

Calls 2

infoFunction · 0.85
set_file_pathMethod · 0.45

Tested by

no test coverage detected