Apache Log4cxx  Version 2.0.0
Loading...
Searching...
No Matches
defaultconfigurator.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef _LOG4CXX_DEFAULT_CONFIGURATOR_H
19#define _LOG4CXX_DEFAULT_CONFIGURATOR_H
20
23#include <tuple>
24
25namespace LOG4CXX_NS
26{
27
32class LOG4CXX_EXPORT DefaultConfigurator
33{
34 private:
35 DefaultConfigurator() {}
36
37 public:
71
77 static LogString setConfiguratorClass(const LogString& className);
78
93
104 static int setConfigurationWatchSeconds(int seconds);
105
145 static std::tuple<spi::ConfigurationStatus,LogString> configureFromFile
146 ( const std::vector<LogString>& directories
147 , const std::vector<LogString>& filenames
148 );
149}; // class DefaultConfigurator
150} // namespace log4cxx
151
152#endif //_LOG4CXX_DEFAULT_CONFIGURATOR_H
static int setConfigurationWatchSeconds(int seconds)
Make seconds the time a background task will delay before checking for a change to the configuration ...
static spi::ConfigurationStatus configure(const spi::LoggerRepositoryPtr &repository={})
Configure repository.
static LogString setConfiguratorClass(const LogString &className)
Instantiate an instance of className to process the configuration file used by configure().
static std::tuple< spi::ConfigurationStatus, LogString > configureFromFile(const std::vector< LogString > &directories, const std::vector< LogString > &filenames)
Call configure() passing the default repository after calling setConfigurationFileName() with a path ...
static LogString setConfigurationFileName(const LogString &path)
Make path the configuration file used by configure().
std::shared_ptr< LoggerRepository > LoggerRepositoryPtr
Definition repositoryselector.h:28
ConfigurationStatus
Definition configurator.h:31
std::basic_string< logchar > LogString
Definition logstring.h:51