33 std::vector<std::reference_wrapper<std::ostream>>
streams;
90 template<
typename T>
void push(
const T& message)
const {
94 for(
size_t i = 0; i <
streams.size(); i++) {
95 if(!
streams[i].get().good())
continue;
98 std::chrono::duration_cast<std::chrono::hours>(elapsed).count() <<
"h " <<
99 std::chrono::duration_cast<std::chrono::minutes>(elapsed).count() % 60 <<
"m " <<
100 std::chrono::duration_cast<std::chrono::seconds>(elapsed).count() % 60 <<
"s " <<
101 std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count() % 1000 <<
"ms]-> "
modified std::exception class The only difference is that you define message by yourself when create...
Definition exceptions.hpp:27
void stop()
stops the logger
bool flagReady
Definition logs.hpp:34
time::Clock clock
Definition logs.hpp:32
void addStream(std::basic_ostream< char > &p_stream)
void activate()
activates the timer
void start()
initializes the logger
bool flagActive
Definition logs.hpp:35
void push(const T &message) const
pushes message to all the logger streams
Definition logs.hpp:90
void deactivate()
deactivates the timer
std::vector< std::reference_wrapper< std::ostream > > streams
Definition logs.hpp:33
wrapper for part of std::chrono::steady_clock STL interface
Definition time.hpp:39
chrono::steady_clock::duration timeElapsed() const
project api's namespace
Definition atm.hpp:4