File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed
power_grid_model_c/power_grid_model/include/power_grid_model/common Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,6 @@ struct Logger {
4949 virtual void log (LogEvent tag, double value) = 0;
5050 virtual void log (LogEvent tag, Idx value) = 0;
5151
52- // creates a new logger of the same type as the current one
53- virtual std::unique_ptr<Logger> clone () const = 0;
54-
5552 virtual ~Logger () = default ;
5653};
5754
Original file line number Diff line number Diff line change 1111
1212namespace power_grid_model ::common::logging {
1313class NoLogger : public Logger {
14- void log (LogEvent /* tag*/ ) override {}
15- void log (LogEvent /* tag*/ , std::string_view /* message*/ ) override {}
16- void log (LogEvent /* tag*/ , double /* value*/ ) override {}
17- void log (LogEvent /* tag*/ , Idx /* value*/ ) override {}
18- std::unique_ptr<Logger> clone () const override { return std::make_unique<NoLogger>(); }
14+ virtual void log (LogEvent /* tag*/ ) override { /* no logging */ }
15+ virtual void log (LogEvent /* tag*/ , std::string_view /* message*/ ) override { /* no logging */ }
16+ virtual void log (LogEvent /* tag*/ , double /* value*/ ) override { /* no logging */ }
17+ virtual void log (LogEvent /* tag*/ , Idx /* value*/ ) override { /* no logging */ }
1918};
2019
2120} // namespace power_grid_model::common::logging
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class Timer {
5555 if (info_ != nullptr ) {
5656 auto const now = Clock::now ();
5757 auto const duration = Duration (now - start_);
58- info_->log (code_, static_cast < double >( duration.count () ));
58+ info_->log (code_, duration.count ());
5959 info_ = nullptr ;
6060 }
6161 }
You can’t perform that action at this time.
0 commit comments