equal
deleted
inserted
replaced
88 |
88 |
89 class TestLogSavedConfig { |
89 class TestLogSavedConfig { |
90 private: |
90 private: |
91 char* _saved_config; |
91 char* _saved_config; |
92 char* _new_output; |
92 char* _new_output; |
93 LogHandle(logging) _log; |
93 Log(logging) _log; |
94 public: |
94 public: |
95 TestLogSavedConfig(const char* apply_output = NULL, const char* apply_setting = NULL) : _new_output(0) { |
95 TestLogSavedConfig(const char* apply_output = NULL, const char* apply_setting = NULL) : _new_output(0) { |
96 _saved_config = os::strdup_check_oom(LogOutput::Stdout->config_string()); |
96 _saved_config = os::strdup_check_oom(LogOutput::Stdout->config_string()); |
97 bool success = LogConfiguration::parse_log_arguments("stdout", "all=off", NULL, NULL, _log.error_stream()); |
97 bool success = LogConfiguration::parse_log_arguments("stdout", "all=off", NULL, NULL, _log.error_stream()); |
98 assert(success, "test unable to turn all off"); |
98 assert(success, "test unable to turn all off"); |
150 Test_logconfiguration_subscribe_triggered++; |
150 Test_logconfiguration_subscribe_triggered++; |
151 } |
151 } |
152 |
152 |
153 void Test_logconfiguration_subscribe() { |
153 void Test_logconfiguration_subscribe() { |
154 ResourceMark rm; |
154 ResourceMark rm; |
155 LogHandle(logging) log; |
155 Log(logging) log; |
156 |
156 |
157 TestLogSavedConfig log_cfg("stdout", "logging+test=trace"); |
157 TestLogSavedConfig log_cfg("stdout", "logging+test=trace"); |
158 |
158 |
159 LogConfiguration::register_update_listener(&Test_logconfiguration_subscribe_helper); |
159 LogConfiguration::register_update_listener(&Test_logconfiguration_subscribe_helper); |
160 |
160 |