log4cpp::R...leAppender(3)
πΈ log4cpp::RollingFileAppender πΈ
okay so bestie, this is from the Library Functions Manual for log4cpp, and it's literally the manual page for RollingFileAppender. it's a FileAppender that rolls over the logfile once it hits a size limit β iconic behavior for keeping your logs from becoming a whole mess π
β¨ NAME β¨
log4cpp::RollingFileAppender β okay so it's a FileAppender that rolls over the logfile once it's reached a certain size limit. literally that's the whole vibe.
π SYNOPSIS π
#include <RollingFileAppender.hh>
it inherits from log4cpp::FileAppender. slay.
π Public Member Functions π
RollingFileAppender (const std::string &name, const std::string &fileName, size_t maxFileSize=10 *1024 *1024, unsigned int maxBackupIndex=1, bool append=true, mode_t mode=00644)virtual void setMaxBackupIndex (unsigned int maxBackups)virtual unsigned int getMaxBackupIndex () constvirtual void setMaximumFileSize (size_t maxFileSize)virtual size_t getMaxFileSize () constvirtual void rollOver ()
π Public Member Functions inherited from log4cpp::FileAppender
FileAppender (const std::string &name, const std::string &fileName, bool append=true, mode_t mode=00644)β Constructs aFileAppender. periodt.FileAppender (const std::string &name, int fd)β Constructs aFileAppenderto an already open file descriptor. iykyk.virtual ~FileAppender ()virtual bool reopen ()β Reopens the logfile.virtual void close ()β Closes the logfile.virtual void setAppend (bool append)β Sets the append vs truncate flag.virtual bool getAppend () constβ Gets the value of the'append'option.virtual void setMode (mode_t mode)β Sets the file open mode.virtual mode_t getMode () constβ Gets the file open mode.
π¦ Public Member Functions inherited from log4cpp::LayoutAppender
LayoutAppender (const std::string &name)virtual ~LayoutAppender ()virtual bool requiresLayout () constβ Check if the appender requires a layout.virtual void setLayout (Layout *layout=NULL)β Set theLayoutfor this appender.
π§ Public Member Functions inherited from log4cpp::AppenderSkeleton
virtual ~AppenderSkeleton ()β Destructor forAppenderSkeleton.virtual void doAppend (const LoggingEvent &event)β Log inAppenderspecific way.virtual void setThreshold (Priority::Value priority)β Set the threshold priority of thisAppender.virtual Priority::Value getThreshold ()β Get the threshold priority of thisAppender.virtual void setFilter (Filter *filter)β Set aFilterfor this appender.virtual Filter * getFilter ()β Get theFilterfor this appender.
π Public Member Functions inherited from log4cpp::Appender
virtual ~Appender ()β Destructor forAppender.const std::string & getName () constβ Get the name of this appender.
π Protected Member Functions π
virtual void _append (const LoggingEvent &event)β Log inAppenderspecific way.
πΈ Protected Member Functions inherited from log4cpp::LayoutAppender
Layout & _getLayout ()β Return the layout of the appender.
πΊ Protected Member Functions inherited from log4cpp::AppenderSkeleton
AppenderSkeleton (const std::string &name)β Constructor forAppenderSkeleton.
π· Protected Member Functions inherited from log4cpp::Appender
Appender (const std::string &name)β Constructor forAppender.
π Protected Attributes π
unsigned int _maxBackupIndexunsigned short int _maxBackupIndexWidthsize_t _maxFileSize
πΌ Protected Attributes inherited from log4cpp::FileAppender
const std::string _fileNameint _fdint _flagsmode_t _mode
π«Ά Additional Inherited Members π«Ά
π« Public Types inherited from log4cpp::LayoutAppender
typedef BasicLayout DefaultLayoutType
β Static Public Member Functions inherited from log4cpp::Appender
static Appender * getAppender (const std::string &name)β Get a pointer to an exitsingAppender. (yes, "exitsing" β that's exactly what the original says, bestie, not me π)static bool reopenAll ()β Callreopen()on all existingAppenders.static void closeAll ()β Callreopen()on all existingAppenders.
π Detailed Description π
RollingFileAppender is a FileAppender that rolls over the logfile once it has reached a certain size limit.
Since: 0.3.1 β it's been iconic since day one, no cap.
π₯ Constructor & Destructor Documentation π₯
log4cpp::RollingFileAppender::RollingFileAppender (const std::string & name, const std::string & fileName, size_t maxFileSize = 10*1024*1024, unsigned int maxBackupIndex = 1, bool append = true, mode_t mode = 00644)
that's the main character constructor right there. defaults are literally all laid out for you: maxFileSize = 10*1024*1024, maxBackupIndex = 1, append = true, mode = 00644.
β¨ Member Function Documentation β¨
void log4cpp::RollingFileAppender::_append (const LoggingEvent & event)
[protected], [virtual] β Log in Appender specific way. Subclasses of Appender should implement this method to perform actual logging.
Parameters:
- event β The
LoggingEventto log.
Reimplemented from log4cpp::FileAppender.
unsigned int log4cpp::RollingFileAppender::getMaxBackupIndex () const
[virtual] β gets the max backup index, periodt.
size_t log4cpp::RollingFileAppender::getMaxFileSize () const
[virtual] β gets the max file size, obviously πββοΈ
void log4cpp::RollingFileAppender::rollOver ()
[virtual] β the rollover moment. it's giving main character energy.
void log4cpp::RollingFileAppender::setMaxBackupIndex (unsigned int maxBackups)
[virtual] β sets the max backup index.
void log4cpp::RollingFileAppender::setMaximumFileSize (size_t maxFileSize)
[virtual] β sets the maximum file size.
π Member Data Documentation π
unsigned int log4cpp::RollingFileAppender::_maxBackupIndex[protected]unsigned short int log4cpp::RollingFileAppender::_maxBackupIndexWidth[protected]size_t log4cpp::RollingFileAppender::_maxFileSize[protected]
π Author π
Generated automatically by Doxygen for log4cpp from the source code. (so not a human author, bestie β it's the Doxygen machine doing its thing π«Ά)
and that's the whole page, fr fr. this manual page is Version 1.1 of log4cpp, dated in the footer β so when you see that footer line at the bottom, just know it's the source/version/date sign-off. slay, you made it to the end, ily πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- opensuse-leap 16.0: log4cpp-devel 1.1.4-bp160.1.12 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms