Qore Logger Module Reference  0.2
All Classes Namespaces Functions Variables Modules Pages
Logger::LoggerAppenderNull Class Reference

Implements appender which does nothing. More...

Inheritance diagram for Logger::LoggerAppenderNull:

Public Member Methods

 processEventImpl (int type, auto params)
 Processes the event to the physical target. 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...
 

Private Member Methods

auto serializeImpl (LoggerEvent event)
 Serializes the given event to put in the queue or write to the target device. 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...
 

Additional Inherited Members

- Public Attributes inherited from Logger::LoggerAppender
const EVENT_CLOSE = 3
 close event
 
const EVENT_LOG = 2
 logging event
 
const EVENT_OPEN = 1
 open event
 

Detailed Description

Implements appender which does nothing.

All events posted to the appender are silently ignored

Member Function Documentation

◆ processEventImpl()

Logger::LoggerAppenderNull::processEventImpl ( int  type,
auto  params 
)
virtual

Processes the event to the physical target.

Must be implemented by non-abstract subclasses

See also
serializeImpl()
Parameters
typesee "EVENT_xxx" constants
paramsprocessing parameters

Implements Logger::LoggerAppender.

◆ serializeImpl()

auto Logger::LoggerAppenderNull::serializeImpl ( LoggerEvent  event)
privatevirtual

Serializes the given event to put in the queue or write to the target device.

The appender implementaion can define any format for serialization. The data are passed to processEventImpl() method in the params argument when type is EVENT_LOG.

Returns
the serialized event

Implements Logger::LoggerAppender.