Flutter Engine
The Flutter Engine
log_settings.cc
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#include "flutter/fml/log_settings.h"
6
7#include <fcntl.h>
8
9#include <algorithm>
10#include <cstring>
11#include <iostream>
12#include <limits>
13
14#include "flutter/fml/build_config.h"
15#include "flutter/fml/log_level.h"
16#include "flutter/fml/logging.h"
17
18namespace fml {
19namespace state {
20
21// Defined in log_settings_state.cc.
23
24} // namespace state
25
27 // Validate the new settings as we set them.
29 std::min(kLogFatal, settings.min_log_level);
30}
31
34}
35
37 return std::min(state::g_log_settings.min_log_level, kLogFatal);
38}
39
41 old_settings_ = GetLogSettings();
43}
44
46 SetLogSettings(old_settings_);
47}
48
49} // namespace fml
ScopedSetLogSettings(const LogSettings &settings)
Definition: log_settings.cc:40
AtkStateType state
static float min(float r, float g, float b)
Definition: hsl.cpp:48
LogSettings g_log_settings
Definition: ascii_trie.cc:9
constexpr LogSeverity kLogFatal
Definition: log_level.h:19
LogSettings GetLogSettings()
Definition: log_settings.cc:32
int GetMinLogLevel()
Definition: log_settings.cc:36
void SetLogSettings(const LogSettings &settings)
Definition: log_settings.cc:26
LogSeverity min_log_level
Definition: log_settings.h:25