forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log_settings.h
40 lines (30 loc) · 1.17 KB
/
log_settings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_FML_LOG_SETTINGS_H_
#define FLUTTER_FML_LOG_SETTINGS_H_
#include "flutter/fml/log_level.h"
#include <string>
namespace fml {
// Settings which control the behavior of FML logging.
struct LogSettings {
// The minimum logging level.
// Anything at or above this level will be logged (if applicable).
// Anything below this level will be silently ignored.
//
// The log level defaults to 0 (LOG_INFO).
//
// Log messages for FML_VLOG(x) (from flutter/fml/logging.h) are logged
// at level -x, so setting the min log level to negative values enables
// verbose logging.
LogSeverity min_log_level = LOG_INFO;
};
// Gets the active log settings for the current process.
void SetLogSettings(const LogSettings& settings);
// Sets the active log settings for the current process.
LogSettings GetLogSettings();
// Gets the minimum log level for the current process. Never returs a value
// higher than LOG_FATAL.
int GetMinLogLevel();
} // namespace fml
#endif // FLUTTER_FML_LOG_SETTINGS_H_