| Qore Logger Module Reference 0.2

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Logger::LoggerAppenderWithLayout Class Reference

Implements an appender with a layout. More...

Inheritance diagram for Logger::LoggerAppenderWithLayout:
[legend]

## Public Member Functions
| 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 Functions 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< LoggerFilter > | getFilters ()
| 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...
abstract | processEventImpl (int type, auto params)
| Processes the event to the physical target. 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...

## Protected Member Functions
auto | serializeImpl (LoggerEvent event)
| Returns the value formatted using the layout pattern. More...
Protected Member Functions 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...

## Private Attributes
LoggerLayout | layout
| assigned layout

## 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 an appender with a layout.

The layout is responsible for formatting the LoggerEvent according to the user's wishes, whereas an appender takes care of sending the formatted output to its destination.

It is used typically for appenders implementing logging to a file

## Member Function Documentation

## ◆ constructor()

Logger::LoggerAppenderWithLayout::constructor | ( | *string | name,
|  | LoggerLayout | layout
| ) |  |

Creates the object.

Parameters

  name | the name of the appender
  layout | the layout for the appender

## ◆ serializeImpl()

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

Returns the value formatted using the layout pattern.

Parameters

  event | the event to serialize

Implements Logger::LoggerAppender.

## ◆ setLayout()

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

Assigns a layout to the appender.

Parameters

  layout | the layout for the appender