proxygen
Init.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 /*
19  * This file contains function to help configure the logging library behavior
20  * during program start-up.
21  */
22 
23 #include <folly/Range.h>
24 
25 namespace folly {
26 
46 void initLogging(folly::StringPiece configString = "");
47 
55 void initLoggingOrDie(folly::StringPiece configString = "");
56 
77 const char* getBaseLoggingConfig();
78 
79 } // namespace folly
80 
90 #define FOLLY_INIT_LOGGING_CONFIG(config) \
91  namespace folly { \
92  const char* getBaseLoggingConfig() { \
93  static constexpr StringPiece configSP((config)); \
94  return configSP.data(); \
95  } \
96  } \
97  static_assert(true, "require a semicolon after FOLLY_INIT_LOGGING_CONFIG()")
const char * getBaseLoggingConfig()
Definition: InitWeak.cpp:29
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29
void initLogging(StringPiece configString)
Definition: Init.cpp:25
void initLoggingOrDie(StringPiece configString)
Definition: Init.cpp:48