Apache log4cxx Version 0.13.0
Loading...
Searching...
No Matches
rollingfileappender.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#ifndef _LOG4CXX_ROLLING_FILE_APPENDER_H
18#define _LOG4CXX_ROLLING_FILE_APPENDER_H
19
20#if defined(_MSC_VER)
21 #pragma warning ( push )
22 #pragma warning ( disable: 4231 4251 4275 4786 )
23#endif
24
26
27namespace log4cxx
28{
29
32{
33 private:
35 long maxFileSize;
36
38 int maxBackupIndex;
39
40 public:
41 //
42 // Use custom class to use non-default name to avoid
43 // conflict with log4cxx::rolling::RollingFileAppender
51
59 RollingFileAppender( const LayoutPtr& layout, const LogString& fileName, bool append );
60
66 RollingFileAppender( const LayoutPtr& layout, const LogString& fileName );
67
69
71 int getMaxBackupIndex() const;
72
74 long getMaximumFileSize() const;
75
76
85 void setMaxBackupIndex( int maxBackupIndex );
86
95 void setMaxFileSize( const LogString& value );
96
97 void setMaximumFileSize( int value );
98
99
100 virtual void setOption( const LogString& option, const LogString& value );
101
103 void activateOptions( log4cxx::helpers::Pool& pool );
104
105
106}; // class RollingFileAppender
107LOG4CXX_PTR_DEF(RollingFileAppender);
108
109} // namespace log4cxx
110
111
112#if defined(_MSC_VER)
113 #pragma warning ( pop )
114#endif
115
116#endif //_LOG4CXX_ROLLING_FILE_APPENDER_H
FileAppender appends log events to a file.
Definition: fileappender.h:47
RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.
Definition: rollingfileappender.h:32
Base class for log4cxx::rolling::RollingFileAppender and log4cxx::RollingFileAppender (analogues of o...
Definition: rollingfileappenderskeleton.h:41
Definition: messagehandler.h:23
std::basic_string< logchar > LogString
Definition: logstring.h:66
std::shared_ptr< Layout > LayoutPtr
Definition: appender.h:48
#define DECLARE_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(object, class)
Definition: object.h:56
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:153
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:147
#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)
Definition: object.h:159
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:141