helpers.h 718 B

1234567891011121314151617181920212223242526272829
  1. // Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
  2. // Distributed under the MIT License (http://opensource.org/licenses/MIT)
  3. #pragma once
  4. #include <spdlog/common.h>
  5. #include <unordered_map>
  6. namespace spdlog {
  7. namespace cfg {
  8. namespace helpers {
  9. //
  10. // Init levels from given string
  11. //
  12. // Examples:
  13. //
  14. // set global level to debug: "debug"
  15. // turn off all logging except for logger1: "off,logger1=debug"
  16. // turn off all logging except for logger1 and logger2: "off,logger1=debug,logger2=info"
  17. //
  18. SPDLOG_API void load_levels(const std::string &txt);
  19. } // namespace helpers
  20. } // namespace cfg
  21. } // namespace spdlog
  22. #ifdef SPDLOG_HEADER_ONLY
  23. #include "helpers-inl.h"
  24. #endif // SPDLOG_HEADER_ONLY