Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
log_settings.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_SETTINGS_H_
6#define FLUTTER_FML_LOG_SETTINGS_H_
7
8#include <string>
9
10#include "flutter/fml/log_level.h"
11
12namespace fml {
13
14// Settings which control the behavior of FML logging.
16 // The minimum logging level.
17 // Anything at or above this level will be logged (if applicable).
18 // Anything below this level will be silently ignored.
19 //
20 // The log level defaults to 0 (kLogInfo).
21 //
22 // Log messages for FML_VLOG(x) (from flutter/fml/logging.h) are logged
23 // at level -x, so setting the min log level to negative values enables
24 // verbose logging.
26};
27
28// Gets the active log settings for the current process.
29void SetLogSettings(const LogSettings& settings);
30
31// Sets the active log settings for the current process.
33
34// Gets the minimum log level for the current process. Never returs a value
35// higher than kLogFatal.
36int GetMinLogLevel();
37
39 public:
40 explicit ScopedSetLogSettings(const LogSettings& settings);
42
43 private:
44 LogSettings old_settings_;
45};
46
47} // namespace fml
48
49#endif // FLUTTER_FML_LOG_SETTINGS_H_
int LogSeverity
Definition log_level.h:11
LogSettings GetLogSettings()
int GetMinLogLevel()
void SetLogSettings(const LogSettings &settings)
constexpr LogSeverity kLogInfo
Definition log_level.h:13
LogSeverity min_log_level