1*9356374aSAndroid Build Coastguard Worker // Copyright 2022 The Abseil Authors. 2*9356374aSAndroid Build Coastguard Worker // 3*9356374aSAndroid Build Coastguard Worker // Licensed under the Apache License, Version 2.0 (the "License"); 4*9356374aSAndroid Build Coastguard Worker // you may not use this file except in compliance with the License. 5*9356374aSAndroid Build Coastguard Worker // You may obtain a copy of the License at 6*9356374aSAndroid Build Coastguard Worker // 7*9356374aSAndroid Build Coastguard Worker // https://www.apache.org/licenses/LICENSE-2.0 8*9356374aSAndroid Build Coastguard Worker // 9*9356374aSAndroid Build Coastguard Worker // Unless required by applicable law or agreed to in writing, software 10*9356374aSAndroid Build Coastguard Worker // distributed under the License is distributed on an "AS IS" BASIS, 11*9356374aSAndroid Build Coastguard Worker // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*9356374aSAndroid Build Coastguard Worker // See the License for the specific language governing permissions and 13*9356374aSAndroid Build Coastguard Worker // limitations under the License. 14*9356374aSAndroid Build Coastguard Worker // 15*9356374aSAndroid Build Coastguard Worker // ----------------------------------------------------------------------------- 16*9356374aSAndroid Build Coastguard Worker // File: log/log_flags.h 17*9356374aSAndroid Build Coastguard Worker // ----------------------------------------------------------------------------- 18*9356374aSAndroid Build Coastguard Worker // 19*9356374aSAndroid Build Coastguard Worker // This header declares set of flags which can be used to configure Abseil 20*9356374aSAndroid Build Coastguard Worker // Logging library behaviour at runtime. 21*9356374aSAndroid Build Coastguard Worker 22*9356374aSAndroid Build Coastguard Worker #ifndef ABSL_LOG_INTERNAL_FLAGS_H_ 23*9356374aSAndroid Build Coastguard Worker #define ABSL_LOG_INTERNAL_FLAGS_H_ 24*9356374aSAndroid Build Coastguard Worker 25*9356374aSAndroid Build Coastguard Worker #include <string> 26*9356374aSAndroid Build Coastguard Worker 27*9356374aSAndroid Build Coastguard Worker #include "absl/flags/declare.h" 28*9356374aSAndroid Build Coastguard Worker 29*9356374aSAndroid Build Coastguard Worker // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 30*9356374aSAndroid Build Coastguard Worker // These flags should not be used in C++ code to access logging library 31*9356374aSAndroid Build Coastguard Worker // configuration knobs. Use interfaces defined in absl/log/globals.h 32*9356374aSAndroid Build Coastguard Worker // instead. It is still ok to use these flags on a command line. 33*9356374aSAndroid Build Coastguard Worker // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 34*9356374aSAndroid Build Coastguard Worker 35*9356374aSAndroid Build Coastguard Worker // Log messages at this severity or above are sent to stderr in *addition* to 36*9356374aSAndroid Build Coastguard Worker // `LogSink`s. Defaults to `ERROR`. See log_severity.h for numeric values of 37*9356374aSAndroid Build Coastguard Worker // severity levels. 38*9356374aSAndroid Build Coastguard Worker ABSL_DECLARE_FLAG(int, stderrthreshold); 39*9356374aSAndroid Build Coastguard Worker 40*9356374aSAndroid Build Coastguard Worker // Log messages at this severity or above are logged; others are discarded. 41*9356374aSAndroid Build Coastguard Worker // Defaults to `INFO`, i.e. log all severities. See log_severity.h for numeric 42*9356374aSAndroid Build Coastguard Worker // values of severity levels. 43*9356374aSAndroid Build Coastguard Worker ABSL_DECLARE_FLAG(int, minloglevel); 44*9356374aSAndroid Build Coastguard Worker 45*9356374aSAndroid Build Coastguard Worker // If specified in the form file:linenum, any messages logged from a matching 46*9356374aSAndroid Build Coastguard Worker // location will also include a backtrace. 47*9356374aSAndroid Build Coastguard Worker ABSL_DECLARE_FLAG(std::string, log_backtrace_at); 48*9356374aSAndroid Build Coastguard Worker 49*9356374aSAndroid Build Coastguard Worker // If true, the log prefix (severity, date, time, PID, etc.) is prepended to 50*9356374aSAndroid Build Coastguard Worker // each message logged. Defaults to true. 51*9356374aSAndroid Build Coastguard Worker ABSL_DECLARE_FLAG(bool, log_prefix); 52*9356374aSAndroid Build Coastguard Worker 53*9356374aSAndroid Build Coastguard Worker // Global log verbosity level. Default is 0. 54*9356374aSAndroid Build Coastguard Worker ABSL_DECLARE_FLAG(int, v); 55*9356374aSAndroid Build Coastguard Worker 56*9356374aSAndroid Build Coastguard Worker // Per-module log verbosity level. By default is empty and is unused. 57*9356374aSAndroid Build Coastguard Worker ABSL_DECLARE_FLAG(std::string, vmodule); 58*9356374aSAndroid Build Coastguard Worker 59*9356374aSAndroid Build Coastguard Worker #endif // ABSL_LOG_INTERNAL_FLAGS_H_ 60