diff --git a/example/example.cpp b/example/example.cpp index 01227247..68228ff3 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -14,6 +14,9 @@ spdlog::logger *get_logger(); int main(int, char *[]) { - auto *l = get_logger(); - l->info("HEllo {}", "HG FS"); + int x = 4; + spdlog::info("HELLO {}", "st at ic"); + spdlog::warn("HELLO {}*{} = {}", x, x, x*x); + /*auto *l = get_logger(); + l->info("HEllo {}", "HG FS");*/ } \ No newline at end of file diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index 7a1ad1f2..24e72e2f 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -34,18 +34,15 @@ public: void register_logger(std::shared_ptr new_logger); void initialize_logger(std::shared_ptr new_logger); - std::shared_ptr get(const std::string &logger_name); - + std::shared_ptr get(const std::string &logger_name); std::shared_ptr default_logger(); - // Return raw ptr to the default logger. // To be used directly by the spdlog default api (e.g. spdlog::info) // This make the default API faster, but cannot be used concurrently with set_default_logger(). // e.g do not call set_default_logger() from one thread while calling spdlog::info() from another. logger *get_default_raw(); - // set default logger. // default logger is stored in default_logger_ (for faster retrieval) and in the loggers_ map. void set_default_logger(std::shared_ptr new_default_logger);