Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
PluginLogger Class Reference

`#include <OpenFlipper/Logging/Logging.hh>`

Inheritance diagram for PluginLogger:

## Signals
void | log (Logtype, QString)
| Sends the generated logs to the core.

## Public Member Functions
| PluginLogger (QString _pluginName, Logtype _type=LOGOUT)
| Standard Constructor. More...
| ~PluginLogger ()
| Destructor.
void | operator<< (const std::string &_s)
| Provide operator for streaming. More...

## Private Slots
void | slotLog (Logtype _type, QString _message)
| Log messages with a given Logtype. More...
void | slotLog (QString _message)
| Wrapper which logs at LOGOUT Logtype by default. More...

## Private Attributes
QString | pluginName_
| prepend this name to all output messages
Logtype | defaultLogType_
| Default logtype ( used for streams )

## Detailed Description

A wrapper class, getting events from an plugin, prepending plugin name to the log and passing it to the core. This class is generated for every plugin of the core. It also does some cleanup of the passed strings.

Definition at line 80 of file Logging.hh.

## Constructor & Destructor Documentation

PluginLogger::PluginLogger | ( | QString | _pluginName,
|  | Logtype | _type = `LOGOUT`
| ) |  |

Standard Constructor.

Parameters

  _pluginName | Name of the Plugin which uses this logger (Prepended to all Output)
  _type | Default log type ( used for streaming operations )

Definition at line 72 of file PluginLogging.cc.

## Member Function Documentation

void PluginLogger::operator<< | ( | const std::string & | _s | ) |

Provide operator for streaming.

This operator is used for streaming ( e.g. catch omerr and omerr streams) and redirect them to the logging widget. The default log level passed to the constructor will be used for the message

Parameters

  _s | String to display

Definition at line 109 of file PluginLogging.cc.

void PluginLogger::slotLog | ( | Logtype | _type,
|  | QString | _message
| ) |  |
| private slot

Log messages with a given Logtype.

Receive log events from plugins and pass them to core

Parameters

  _type | Logtype (defines the color of the output)
  _message | The message for output

Definition at line 85 of file PluginLogging.cc.

void PluginLogger::slotLog | ( | QString | _message | ) |
| private slot

Wrapper which logs at LOGOUT Logtype by default.

Receive log events from plugins (defaults to LOGOUT Message type)

Parameters

  _message | The message for output

Definition at line 96 of file PluginLogging.cc.

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

- OpenFlipper/Logging/Logging.hh
- OpenFlipper/Logging/PluginLogging.cc