franta-hg@12: /** franta-hg@12: * DJM-Fix franta-hg@12: * Copyright © 2020 František Kučera (Frantovo.cz, GlobalCode.info) franta-hg@12: * franta-hg@12: * This program is free software: you can redistribute it and/or modify franta-hg@12: * it under the terms of the GNU General Public License as published by franta-hg@12: * the Free Software Foundation, version 3 of the License. franta-hg@12: * franta-hg@12: * This program is distributed in the hope that it will be useful, franta-hg@12: * but WITHOUT ANY WARRANTY; without even the implied warranty of franta-hg@12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the franta-hg@12: * GNU General Public License for more details. franta-hg@12: * franta-hg@12: * You should have received a copy of the GNU General Public License franta-hg@12: * along with this program. If not, see . franta-hg@12: */ franta-hg@12: #pragma once franta-hg@12: franta-hg@12: #include franta-hg@12: franta-hg@12: namespace djmfix { franta-hg@12: namespace logging { franta-hg@12: franta-hg@12: enum class Level { franta-hg@12: SEVERE, franta-hg@12: WARNING, franta-hg@12: INFO, franta-hg@12: CONFIG, franta-hg@12: FINE, franta-hg@12: FINER, franta-hg@12: FINEST, franta-hg@12: }; franta-hg@12: franta-hg@12: class Logger { franta-hg@12: public: franta-hg@12: virtual ~Logger() = default; franta-hg@12: virtual void log(Level level, const std::string& message) = 0; franta-hg@12: }; franta-hg@12: franta-hg@12: Logger* create(std::ostream& output, Level minLevel); franta-hg@12: Logger* blackhole(); franta-hg@12: franta-hg@12: } franta-hg@12: }