#ifndef LOGGER_HPP_INCLUDED
#define LOGGER_HPP_INCLUDED

#include <iostream>
#include <string>

class Logger : public std::ostream, public std::streambuf
{
    public:
        Logger(const std::string& Prefix, bool Enabled = true);
        Logger(std::string (*Func)(), bool Enabled = true);
        void SetEnabled(bool Toggle);
        bool IsEnabled() const;
        Logger& operator++();
        Logger& operator--();
        Logger& operator++(int);
        Logger& operator--(int);
        virtual std::streambuf::int_type overflow(std::streambuf::int_type Char = std::streambuf::traits_type::eof());
        ~Logger();
    private:
        std::string Prefix = "";
        std::string (*FuncPtr)() = nullptr;
        bool Enabled;
        std::uint32_t TabCount;
        bool MinusAtEndOfNewLine = false;
        bool AddAtEndOfNewLine = false;
        bool NewLine = true;
};

#endif // LOGGER_HPP_INCLUDED
