Flow123d
release_3.0.0-1027-g6cabdfa
|
#include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
#include "system/fmt/format.h"
#include "system/exc_common.hh"
Go to the source code of this file.
Classes | |
class | StreamMask |
Helper class, store mask specifying streams. More... | |
class | Logger |
Class for storing logger messages. More... | |
Macros | |
#define | _LOG(type) Logger( type ).set_context( __FILE__, __func__, __LINE__) |
Internal macro defining universal record of log. More... | |
#define | MessageOut() _LOG( Logger::MsgType::message ) |
Macro defining 'message' record of log. More... | |
#define | WarningOut() _LOG( Logger::MsgType::warning ) |
Macro defining 'warning' record of log. More... | |
#define | LogOut() _LOG( Logger::MsgType::log ) |
Macro defining 'log' record of log. More... | |
#define | DebugOut() _LOG( Logger::MsgType::debug ) |
Macro defining 'debug' record of log. More... | |
#define | print_var(var) std::string(#var) << "=" << (var) << ", " |
Functions | |
Logger & | operator<< (Logger &log, StreamMask mask) |
Logger & | operator<< (Logger &log, std::ostream &(*pf)(std::ostream &)) |
template<class T > | |
Logger & | operator<< (Logger &log, const T &x) |
* Copyright (C) 2015 Technical University of Liberec. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Definition in file logger.hh.
#define _LOG | ( | type | ) | Logger( type ).set_context( __FILE__, __func__, __LINE__) |
#define DebugOut | ( | ) | _LOG( Logger::MsgType::debug ) |
#define LogOut | ( | ) | _LOG( Logger::MsgType::log ) |
#define MessageOut | ( | ) | _LOG( Logger::MsgType::message ) |
#define print_var | ( | var | ) | std::string(#var) << "=" << (var) << ", " |
Print variable name and value. Usage: DebugOut() << print_var(x) << print_var(y)
#define WarningOut | ( | ) | _LOG( Logger::MsgType::warning ) |
Logger& operator<< | ( | Logger & | log, |
StreamMask | mask | ||
) |