Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
26void SetLogSettings(const LogSettings& settings) {
27 // Validate the new settings as we set them.
29 std::min(kLogFatal, settings.min_log_level);
30}
31
35
37 return std::min(state::g_log_settings.min_log_level, kLogFatal);
38}
39
41 old_settings_ = GetLogSettings();
42 SetLogSettings(settings);
43}
44
48
49} // namespace fml
ScopedSetLogSettings(const LogSettings &settings)
AtkStateType state
LogSettings g_log_settings
constexpr LogSeverity kLogFatal
Definition log_level.h:19
LogSettings GetLogSettings()
int GetMinLogLevel()
void SetLogSettings(const LogSettings &settings)
LogSeverity min_log_level