FileAppender.hh
Go to the documentation of this file.
1
/*
2
* FileAppender.hh
3
*
4
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2000, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#ifndef _LOG4CPP_FILEAPPENDER_HH
11
#define _LOG4CPP_FILEAPPENDER_HH
12
13
#include <
log4cpp/Portability.hh
>
14
#include <
log4cpp/LayoutAppender.hh
>
15
#include <string>
16
#include <stdarg.h>
17
18
LOG4CPP_NS_BEGIN
19
20
class
LOG4CPP_EXPORT
FileAppender
:
public
LayoutAppender
{
21
public
:
22
32
FileAppender
(
const
std::string& name,
const
std::string& fileName,
33
bool
append =
true
,
mode_t
mode = 00644);
34
40
FileAppender
(
const
std::string& name,
int
fd);
41
virtual
~
FileAppender
();
42
50
virtual
bool
reopen
();
51
55
virtual
void
close
();
56
65
virtual
void
setAppend(
bool
append);
66
70
virtual
bool
getAppend()
const
;
71
75
virtual
void
setMode(
mode_t
mode);
76
80
virtual
mode_t
getMode()
const
;
81
82
protected
:
83
virtual
void
_append
(
const
LoggingEvent
& event);
84
85
const
std::string
_fileName
;
86
int
_fd
;
87
int
_flags
;
88
mode_t
_mode
;
89
};
90
LOG4CPP_NS_END
91
92
#endif // _LOG4CPP_FILEAPPENDER_HH
LoggingEvent
The top level namespace for all 'Log for C++' types and classes.
Definition:
LoggingEvent.hh:32
AppenderSkeleton::close
virtual void close()=0
Release any resources allocated within the appender such as file handles, network connections,...
Portability.hh
FileAppender::_mode
mode_t _mode
Definition:
FileAppender.hh:88
FileAppender
Definition:
FileAppender.hh:20
FileAppender::_flags
int _flags
Definition:
FileAppender.hh:87
LOG4CPP_NS_BEGIN
#define LOG4CPP_NS_BEGIN
Definition:
Portability.hh:49
LOG4CPP_NS_END
#define LOG4CPP_NS_END
Definition:
Portability.hh:50
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition:
Export.hh:21
FileAppender::_fd
int _fd
Definition:
FileAppender.hh:86
mode_t
int mode_t
Definition:
config-win32.h:145
FileAppender::_fileName
const std::string _fileName
Definition:
FileAppender.hh:85
AppenderSkeleton::reopen
virtual bool reopen()
Reopens the output destination of this Appender, e.g.
LayoutAppender.hh
LayoutAppender
LayoutAppender is a common superclass for all Appenders that require a Layout.
Definition:
LayoutAppender.hh:24
AppenderSkeleton::_append
virtual void _append(const LoggingEvent &event)=0
Log in Appender specific way.
rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Dec 4 2024 03:10:11