Qore Logger Module Reference  0.2
Logger::AbstractLoggerAppenderFileRotate Class Referenceabstract

Abstract class for file appenders with rotation support. More...

Inheritance diagram for Logger::AbstractLoggerAppenderFileRotate:

Public Member Methods

abstract int getCount ()
 Abstract method to get count of rotation objects.
 
 rotate ()
 Pushes rotate event. More...
 
- Public Member Methods inherited from Logger::LoggerAppenderFile
 constructor (*string name, LoggerLayout layout, string filename, *string encoding)
 Creates the object. More...
 
File getFile ()
 Returns the file object for the appender.
 
string getFileName ()
 Returns the current filename.
 
 processEventImpl (int type, auto params)
 Processes open, close, and log events with the file and ignores all other events. More...
 
- Public Member Methods inherited from Logger::LoggerAppenderWithLayout
 constructor (*string name, LoggerLayout layout)
 Creates the object. More...
 
LoggerLayout getLayout ()
 Returns the layout for the appender.
 
 setLayout (LoggerLayout layout)
 Assigns a layout to the appender. More...
 
- Public Member Methods inherited from Logger::LoggerAppender
 addFilter (LoggerFilter filter, bool top=False)
 Adds a filter to the chain. More...
 
 close ()
 Releases any resources allocated by the appender and closes it.
 
 constructor (*string name)
 Creates the object. More...
 
list< LoggerFiltergetFilters ()
 Returns the filter chain as a list. More...
 
string getName ()
 Returns the appender name.
 
*LoggerAppenderQueue getQueue ()
 Returns async queue or NOTHING when events are processed synchronously.
 
bool isOpen ()
 Returns True if the appender is open and therefore active.
 
 open ()
 Opens logging resources. More...
 
bool post (LoggerEvent event)
 Posts the given event to the output queue. More...
 
 removeAllFilters ()
 Clears the filter chain by removing all filters.
 
 removeFilter (LoggerFilter filter)
 Removes the given filter from the filter chain. More...
 
 setQueue (*LoggerAppenderQueue queue)
 Sets the appender queue. More...
 

Public Attributes

const DEFAULT_ROTATION_COUNT = 10
 default value for rotation chain
 
const EVENT_ROTATE = 10001
 rotate event
 
- Public Attributes inherited from Logger::LoggerAppenderFile
const EVENT_REOPEN = 1001
 reopen event
 
- Public Attributes inherited from Logger::LoggerAppender
const EVENT_CLOSE = 3
 close event
 
const EVENT_LOG = 2
 logging event
 
const EVENT_OPEN = 1
 open event
 

Additional Inherited Members

- Private Member Methods inherited from Logger::LoggerAppenderWithLayout
auto serializeImpl (LoggerEvent event)
 Returns the value formatted using the layout pattern. More...
 
- Private Member Methods inherited from Logger::LoggerAppender
bool pushEvent (int type, auto params)
 Pushes the given event on the queue or calls processEventImpl() in case of synchronous processing. More...
 

Detailed Description

Abstract class for file appenders with rotation support.

Member Function Documentation

◆ rotate()

Logger::AbstractLoggerAppenderFileRotate::rotate ( )

Pushes rotate event.

The current log file will be closed and opened. If the file exists, then it is ovewritten

Exceptions
LOGGER-ERRORif rotation is disabled