class ulog::PoolLogHandler — HIRO 0.7.0 documentation

# class ulog::PoolLogHandler

## Overview

Stores log messages in a pool to be processed later. More…

    #include <Ulog.h>

    class PoolLogHandler: public ulog::LogHandler {
    public:
        // methods

        virtual void AddMessage(ulog::Entry::Type type, ulog::Category categ, const std::string& msg, const std::string& caller);
        void ProcessEntries(std::function<void(const ulog::Entry&)> func);
        size_t GetEntryCount() const;
    };

### Inherited Members

    public:
        // methods

        virtual void AddMessage(ulog::Entry::Type type, ulog::Category categ, const std::string& msg, const std::string& caller) = 0;

## Detailed Documentation

Stores log messages in a pool to be processed later.

### Methods

    virtual void AddMessage(ulog::Entry::Type type, ulog::Category categ, const std::string& msg, const std::string& caller)

Add message to the handler.

    void ProcessEntries(std::function<void(const ulog::Entry&)> func)

For every message stored in the pool, executes the specified function. Pool is empty afterwards.

    size_t GetEntryCount() const

Returns the number of log entries in the pool.