logger.ipp 578 B

12345678910111213141516171819202122232425
  1. //
  2. // Copyright (c) 2025 Marcelo Zimbres Silva (mzimbres@gmail.com),
  3. // Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. #include <boost/redis/impl/log_to_file.hpp>
  9. #include <boost/redis/logger.hpp>
  10. #include <cstdio>
  11. #include <string_view>
  12. namespace boost::redis {
  13. logger::logger(level l)
  14. : lvl{l}
  15. , fn{[](level, std::string_view msg) {
  16. detail::log_to_file(stderr, msg);
  17. }}
  18. { }
  19. } // namespace boost::redis