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