diff --git a/include/spdlog/details/spdlog_impl.h b/include/spdlog/details/spdlog_impl.h index b6c95825..16c1a901 100644 --- a/include/spdlog/details/spdlog_impl.h +++ b/include/spdlog/details/spdlog_impl.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -104,6 +105,13 @@ inline std::shared_ptr spdlog::syslog_logger(const std::string& } #endif +#if defined(__ANDROID__) +inline std::shared_ptr spdlog::android_logger(const std::string& logger_name, const std::string& tag) +{ + return create(logger_name, tag); +} +#endif + // Create and register a logger a single sink inline std::shared_ptr spdlog::create(const std::string& logger_name, const spdlog::sink_ptr& sink) { diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h index dcb9f59e..35067629 100644 --- a/include/spdlog/spdlog.h +++ b/include/spdlog/spdlog.h @@ -101,6 +101,9 @@ std::shared_ptr stderr_logger_st(const std::string& logger_name, bool co std::shared_ptr syslog_logger(const std::string& logger_name, const std::string& ident = "", int syslog_option = 0); #endif +#if defined(__ANDROID__) +std::shared_ptr android_logger(const std::string& logger_name, const std::string& tag = "spdlog"); +#endif // Create and register a logger a single sink std::shared_ptr create(const std::string& logger_name, const sink_ptr& sink);