-
Notifications
You must be signed in to change notification settings - Fork 5k
make level_enum from_str() case insensitive #3525 #3531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -278,6 +278,9 @@ enum level_enum : int { | |
|
|
||
| SPDLOG_API const string_view_t &to_string_view(spdlog::level::level_enum l) SPDLOG_NOEXCEPT; | ||
| SPDLOG_API const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOEXCEPT; | ||
|
|
||
| // Checks whether name is the same as one of the log level names and returns the respective enum. | ||
| // The comparison is case-insensitive. | ||
| SPDLOG_API spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT; | ||
|
|
||
| } // namespace level | ||
|
|
@@ -296,6 +299,11 @@ enum class pattern_time_type { | |
| utc // log utc | ||
| }; | ||
|
|
||
| // | ||
| // Returns true if two strings are equal, case-insensitive | ||
| // | ||
| SPDLOG_API bool strings_equal_ci(string_view_t s1, string_view_t s2); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why SPDLOG_API ? i would expect SPDLOG_INLINE
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can change that, no problem. But if I didn't mix things up, there is a second merge request for the same issue: If you prefer the other one, I wouldn't put more work into my merge request.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure yet. The other merge seems bit leaner indeed |
||
|
|
||
| // | ||
| // Log exception | ||
| // | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why SPDLOG_API. I would expect SPDLOG_INLINE