Flow123d
JS_before_hm-2206-gca2a8366f
|
#include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
#include <vector>
#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... | |
struct | manipulators::Array< Cont, Delim > |
Namespaces | |
manipulators | |
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 std::vector< T > &vec) |
template<class T , long unsigned int N> | |
Logger & | operator<< (Logger &log, const std::array< T, N > &vec) |
template<class T > | |
Logger & | operator<< (Logger &log, const T &x) |
template<typename T , typename Delim = const char*> | |
manipulators::Array< T, Delim > | format (T const &deduce, Delim delim=", ") |
* 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 ) |
manipulators::Array<T, Delim> format | ( | T const & | deduce, |
Delim | delim = ", " |
||
) |
Logger& operator<< | ( | Logger & | log, |
const std::vector< T > & | vec | ||
) |
Logger& operator<< | ( | Logger & | log, |
StreamMask | mask | ||
) |