Apache log4cxx Version 0.13.0
dailyrollingfileappender.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_DAILYROLLINGFILEAPPENDER_H
19#define _LOG4CXX_DAILYROLLINGFILEAPPENDER_H
20
21#if defined(_MSC_VER)
22 #pragma warning ( push )
23 #pragma warning ( disable: 4231 4251 4275 4786 )
24#endif
25
26
27#include <log4cxx/appender.h>
31
32namespace log4cxx
33{
34namespace helpers
35{
36class Pool;
37}
38
39namespace spi
40{
41class ErrorHandler;
42typedef std::shared_ptr<ErrorHandler> ErrorHandlerPtr;
43}
44
45
147{
153
154
157 LogString datePattern;
158
159
160 public:
165
173 const LayoutPtr& layout,
174 const LogString& filename,
175 const LogString& datePattern);
176
177
183 void setDatePattern(const LogString& pattern);
184
187
188 void setOption(const LogString& option,
189 const LogString& value);
190
195
196};
197
199
200}
201
202#if defined(_MSC_VER)
203 #pragma warning ( pop )
204#endif
205
206
207#endif
DailyRollingFileAppender extends FileAppender so that the underlying file is rolled over at a user ch...
Definition: dailyrollingfileappender.h:147
LogString getDatePattern() const
Returns the value of the DatePattern option.
DailyRollingFileAppender()
The default constructor simply calls its parents constructor.
void setDatePattern(const LogString &pattern)
The DatePattern takes a string in the same format as expected by SimpleDateFormat.
void setOption(const LogString &option, const LogString &value)
Set option to value.
DailyRollingFileAppender(const LayoutPtr &layout, const LogString &filename, const LogString &datePattern)
Instantiate a DailyRollingFileAppender and open the file designated by filename.
void activateOptions(log4cxx::helpers::Pool &)
Prepares DailyRollingFileAppender for use.
FileAppender appends log events to a file.
Definition: fileappender.h:47
Definition: pool.h:33
Base class for log4cxx::rolling::RollingFileAppender and log4cxx::RollingFileAppender (analogues of o...
Definition: rollingfileappenderskeleton.h:41
std::shared_ptr< ErrorHandler > ErrorHandlerPtr
Definition: appender.h:44
Definition: messagehandler.h:23
std::basic_string< logchar > LogString
Definition: logstring.h:66
std::shared_ptr< Layout > LayoutPtr
Definition: appender.h:48
LOG4CXX_PTR_DEF(Appender)
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:153
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:147
#define DECLARE_LOG4CXX_OBJECT(object)
Definition: object.h:39
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition: object.h:159
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:141