Added "basic_logger_mt/basic_logger_st" to the API

This commit is contained in:
gabime
2016-06-22 00:23:55 +03:00
parent cef7eb0667
commit a047b58e65
5 changed files with 32 additions and 2 deletions

View File

@@ -35,6 +35,17 @@ inline void spdlog::drop(const std::string &name)
details::registry::instance().drop(name);
}
// Create multi/single threaded simple file logger
inline std::shared_ptr<spdlog::logger> spdlog::basic_logger_mt(const std::string& logger_name, const filename_t& filename, bool force_flush)
{
return create<spdlog::sinks::simple_file_sink_mt>(logger_name, filename, force_flush);
}
inline std::shared_ptr<spdlog::logger> spdlog::basic_logger_st(const std::string& logger_name, const filename_t& filename, bool force_flush)
{
return create<spdlog::sinks::simple_file_sink_st>(logger_name, filename, force_flush);
}
// Create multi/single threaded rotating file logger
inline std::shared_ptr<spdlog::logger> spdlog::rotating_logger_mt(const std::string& logger_name, const filename_t& filename, size_t max_file_size, size_t max_files, bool force_flush)
{