Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / mozglue / misc / LoggingCore.cpp
blob022ffc850cf22c34c3b8280b2bb1af4e67e9098d
1 /* vim: set shiftwidth=4 tabstop=8 autoindent cindent expandtab: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "LoggingCore.h"
8 #include <algorithm>
10 namespace mozilla {
12 LogLevel ToLogLevel(int32_t aLevel) {
13 aLevel = std::min(aLevel, static_cast<int32_t>(LogLevel::Verbose));
14 aLevel = std::max(aLevel, static_cast<int32_t>(LogLevel::Disabled));
15 return static_cast<LogLevel>(aLevel);
18 } // namespace mozilla