Adds writer test case for RCU
[folly.git] / folly / experimental / logging / Init.h
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
27 /**
28  * Initialize the logging library.
29  *
30  * The input string will be parsed with parseLogConfig() and then applied to
31  * the main LoggerDB singleton.
32  *
33  * Before it is applied, the input configuration settings are first combined
34  * with some basic defaults on the root log category.  The defaults set the
35  * root log level to WARN, and attach a log handler named "default" that writes
36  * messages to stderr.  However, these base settings can be overridden if the
37  * input string specifies alternate settings for the root log category.
38  *
39  * Note that it is safe for code to use logging functions before calling
40  * initLogging().  However, messages logged before initLogging() is called will
41  * be ignored since no log handler objects have been defined.
42  */
43 void initLogging(folly::StringPiece configString = "");
44
45 } // namespace folly