mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-16 00:45:48 +08:00
23 lines
490 B
C++
23 lines
490 B
C++
#pragma once
|
|
|
|
#include <unordered_map>
|
|
#include <string>
|
|
#include <memory>
|
|
#include <mutex>
|
|
|
|
namespace c11log {
|
|
class logger;
|
|
namespace details {
|
|
class factory {
|
|
public:
|
|
typedef std::shared_ptr<c11log::logger> logger_ptr;
|
|
typedef std::unordered_map<std::string, logger_ptr> logger_map;
|
|
logger_ptr get_logger(const std::string &name);
|
|
static c11log::details::factory& instance();
|
|
private:
|
|
logger_map _loggers;
|
|
std::mutex _loggers_mutex;
|
|
};
|
|
}
|
|
}
|