| Qore logger_bin Module 2.0.0

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Qore::Logger::LoggerAppenderWithLayout Class Reference

Abstract class that defines the interface for logger appenders. More...

`#include <QC_LoggerAppenderWithLayout.dox.h>`

Inheritance diagram for Qore::Logger::LoggerAppenderWithLayout:

## Public Member Functions
| constructor (LoggerLayout layout)
| Creates the object.
| constructor (*string name, LoggerLayout layout)
| Creates the object.
LoggerLayout | getLayout ()
| Returns the layout for the appender.
| setLayout (LoggerLayout layout)
| Assigns a layout to the appender.
Public Member Functions inherited from Qore::Logger::LoggerAppender
| addFilter (LoggerFilter filter, bool top=False)
| Adds a filter to the chain.
| close ()
| Releases any resources allocated by the appender and closes it.
| constructor ()
| Creates the object.
| constructor (string name)
| Creates the object.
list< LoggerFilter > | getFilters ()
| Returns the filter chain as a list.
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.
bool | post (LoggerEvent event)
| Posts the given event to the output queue.
| processEvent (int type, auto params)
| Processes an event to the physical target.
abstract | processEventImpl (int type, auto params)
| Processes the event to the physical target.
| removeAllFilters ()
| Clears the filter chain by removing all filters.
| removeFilter (LoggerFilter filter)
| Removes the given filter from the filter chain.
| setQueue (*LoggerAppenderQueue queue)
| Sets the appender queue.

## Protected Member Functions
auto | serializeImpl (LoggerEvent event)
| Serializes the given event to put in the queue or write to the target device.
Protected Member Functions inherited from Qore::Logger::LoggerAppender
*object | ensureAtomicOperations (int type)
| Returns an object that can be used to ensure atomic operations for appender operations.
bool | pushEvent (int type, auto params)
| Pushes the given event on the queue or calls processEvent() in case of synchronous processing.
abstract auto | serializeImpl (LoggerEvent event)
| Serializes the given event to put in the queue or write to the target device.

## Detailed Description

Abstract class that defines the interface for logger appenders.

Event data (LoggerEvent) are formatted before the record is passed to the target

## Member Function Documentation

## ◆ serializeImpl()

auto Qore::Logger::LoggerAppenderWithLayout::serializeImpl | ( | LoggerEvent | event | ) |
| protected

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 processEvent() method in the `params` argument when `type` is `EVENT_LOG`.

Returns
  the serialized event

## ◆ setLayout()

Qore::Logger::LoggerAppenderWithLayout::setLayout | ( | LoggerLayout | layout | ) |

Assigns a layout to the appender.

Parameters

  layout | the layout for the appender

The documentation for this class was generated from the following file:

- modules/logger_bin/src/QC_LoggerAppenderWithLayout.dox.h