diff options
Diffstat (limited to 'src/logging.cc')
-rw-r--r-- | src/logging.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/logging.cc b/src/logging.cc new file mode 100644 index 0000000..623fbeb --- /dev/null +++ b/src/logging.cc @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: BSD-3-Clause + +#include "logging.h" + +std::mutex custom_log::mutex_; + +custom_log::custom_log(std::ostream& os, const std::string& func) + : os_(os) +{ + mutex_.lock(); + os_ << func << ": "; +} + +custom_log::~custom_log() { + os_ << std::endl; + mutex_.unlock(); +}
\ No newline at end of file |