Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
log_level.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_FML_LOG_LEVEL_H_
6#define FLUTTER_FML_LOG_LEVEL_H_
7
8namespace fml {
9
10// Default log levels. Negative values can be used for verbose log levels.
11typedef int LogSeverity;
12
13constexpr LogSeverity kLogInfo = 0;
15constexpr LogSeverity kLogError = 2;
16// A log that is not an error, is important enough to display even if ordinary
17// info is hidden.
19constexpr LogSeverity kLogFatal = 4;
21
22// DEPRECATED: Use |kLogInfo|.
23// Ignoring Clang Tidy because this is used in a very common substitution macro.
24// NOLINTNEXTLINE(readability-identifier-naming)
26
27// DEPRECATED: Use |kLogWarning|.
28// Ignoring Clang Tidy because this is used in a very common substitution macro.
29// NOLINTNEXTLINE(readability-identifier-naming)
31
32// DEPRECATED: Use |kLogError|.
33// Ignoring Clang Tidy because this is used in a very common substitution macro.
34// NOLINTNEXTLINE(readability-identifier-naming)
36
37// DEPRECATED: Use |kLogImportant|.
38// Ignoring Clang Tidy because this is used in a very common substitution macro.
39// NOLINTNEXTLINE(readability-identifier-naming)
41
42// DEPRECATED: Use |kLogFatal|.
43// Ignoring Clang Tidy because this is used in a very common substitution macro.
44// NOLINTNEXTLINE(readability-identifier-naming)
46
47// One of the Windows headers defines ERROR to 0. This makes the token
48// concatenation in FML_LOG(ERROR) to resolve to LOG_0. We define this back to
49// the appropriate log level.
50#ifdef _WIN32
51#define LOG_0 kLogError
52#endif
53
54// kLogDFatal is kLogFatal in debug mode, kLogError in normal mode
55#ifdef NDEBUG
57#else
59#endif
60
61// DEPRECATED: Use |kLogDFatal|.
62// Ignoring Clang Tidy because this is used in a very common substitution macro.
63// NOLINTNEXTLINE(readability-identifier-naming)
65
66} // namespace fml
67
68#endif // FLUTTER_FML_LOG_LEVEL_H_
constexpr LogSeverity LOG_ERROR
Definition log_level.h:35
constexpr LogSeverity LOG_INFO
Definition log_level.h:25
constexpr LogSeverity kLogFatal
Definition log_level.h:19
int LogSeverity
Definition log_level.h:11
constexpr LogSeverity kLogNumSeverities
Definition log_level.h:20
constexpr LogSeverity kLogImportant
Definition log_level.h:18
constexpr LogSeverity kLogError
Definition log_level.h:15
constexpr LogSeverity LOG_FATAL
Definition log_level.h:45
constexpr LogSeverity kLogInfo
Definition log_level.h:13
constexpr LogSeverity LOG_IMPORTANT
Definition log_level.h:40
const LogSeverity LOG_DFATAL
Definition log_level.h:64
constexpr LogSeverity kLogWarning
Definition log_level.h:14
constexpr LogSeverity LOG_WARNING
Definition log_level.h:30
const LogSeverity kLogDFatal
Definition log_level.h:58