libzypp 17.38.1
LogTools.h File Reference
#include <iostream>
#include <optional>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <zypp-core/base/Hash.h>
#include <zypp-core/base/Logger.h>
#include <zypp-core/base/String.h>
#include <zypp-core/base/Iterator.h>
#include <zypp-core/Globals.h>
Include dependency graph for LogTools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  zypp::str::detail::RefStore< T >
 Helper to store a reference or move rvalues inside. More...
struct  zypp::str::detail::RefStore< T & >
 Store reference. More...
struct  zypp::str::detail::NoPrint
 Store nothing print nothing. More...
struct  zypp::str::detail::RefStore< NoPrint >
struct  zypp::str::detail::RefStore< NoPrint & >
struct  zypp::str::detail::JoinFormat< Intro, Pfx, Sep, Sfx, Extro, Pel, Sel >
 A basic format description to print a collection. More...
struct  zypp::str::detail::PrintFmt< Ostream, Format >
 Log helper wrapping the Ostream and Format. More...
struct  zypp::MLSep
 Helper to produce not-NL-terminated multi line output. More...
struct  zypp::iomanip::RangeLine< TIterator >
class  zypp::_logtoolsdetail::MapEntry< TPair >
 std::pair wrapper for std::map output. More...
class  zypp::_logtoolsdetail::DumpMap< TMap >
 std::map wrapper for stream output. More...
struct  zypp::_logtoolsdetail::DumpMap< TMap >::Transformer
class  zypp::_logtoolsdetail::DumpKeys< TMap >
 std::map wrapper for stream output of keys. More...
class  zypp::_logtoolsdetail::DumpValues< TMap >
 std::map wrapper for stream output of values. More...
struct  zypp::detail::Dump< Tp >

Namespaces

namespace  zypp
namespace  zypp::str
 Provide print[f] and sprint[f] functions based on JoinFormat.
namespace  zypp::str::detail
namespace  zypp::iomanip
namespace  std
namespace  zypp::_logtoolsdetail
namespace  zypp::detail

Macros

#define pXXX   zypp::str::detail::PrintFmt(XXX,zypp::str::FormatLine)
#define pDBG   zypp::str::detail::PrintFmt(DBG,zypp::str::FormatLine)
#define pMIL   zypp::str::detail::PrintFmt(MIL,zypp::str::FormatLine)
#define pWAR   zypp::str::detail::PrintFmt(WAR,zypp::str::FormatLine)
#define pERR   zypp::str::detail::PrintFmt(ERR,zypp::str::FormatLine)
#define pSEC   zypp::str::detail::PrintFmt(SEC,zypp::str::FormatLine)
#define pINT   zypp::str::detail::PrintFmt(INT,zypp::str::FormatLine)
#define pUSR   zypp::str::detail::PrintFmt(USR,zypp::str::FormatLine)
#define wXXX   zypp::str::detail::PrintFmt(XXX,zypp::str::FormatWords)
#define wDBG   zypp::str::detail::PrintFmt(DBG,zypp::str::FormatWords)
#define wMIL   zypp::str::detail::PrintFmt(MIL,zypp::str::FormatWords)
#define wWAR   zypp::str::detail::PrintFmt(WAR,zypp::str::FormatWords)
#define wERR   zypp::str::detail::PrintFmt(ERR,zypp::str::FormatWords)
#define wSEC   zypp::str::detail::PrintFmt(SEC,zypp::str::FormatWords)
#define wINT   zypp::str::detail::PrintFmt(INT,zypp::str::FormatWords)
#define wUSR   zypp::str::detail::PrintFmt(USR,zypp::str::FormatWords)

Typedefs

using zypp::str::NoPrint = detail::NoPrint

Functions

std::ostream & zypp::str::detail::operator<< (std::ostream &str, const NoPrint &obj)
template<>
std::ostream & zypp::str::detail::operator<< (std::ostream &str, const RefStore< NoPrint > &obj)
template<>
std::ostream & zypp::str::detail::operator<< (std::ostream &str, const RefStore< NoPrint & > &obj)
template<typename Ostream, typename Format>
void zypp::str::detail::_joinSF (Ostream &str, const Format &fmt)
template<typename Ostream, typename Format, typename First>
void zypp::str::detail::_joinSF (Ostream &str, const Format &fmt, First &&first)
template<typename Ostream, typename Format, typename First, typename... Args>
void zypp::str::detail::_joinSF (Ostream &str, const Format &fmt, First &&first, Args &&... args)
template<typename Ostream, typename Format, typename... Args>
Ostream & zypp::str::detail::joinSF (Ostream &str, Format &&fmt, Args &&... args)
 Print args on ostreamlike str using JoinFormat fmt.
template<typename Ostream, typename Format, typename... Args>
Ostream & zypp::str::printf (Ostream &str, Format &&fmt, Args &&... args)
 Print Format on stream.
template<typename Format, typename... Args>
std::string zypp::str::sprintf (Format &&fmt, Args &&... args)
 Print Format fs string.
template<typename Ostream, typename... Args>
Ostream & zypp::str::print (Ostream &str, Args &&... args)
 Print words on stream.
template<typename... Args>
std::string zypp::str::sprint (Args &&... args)
 Print words as string.
template<typename Ostream, typename... Args>
Ostream & zypp::str::concat (Ostream &str, Args &&... args)
 Concat words on stream.
template<typename... Args>
std::string zypp::str::sconcat (Args &&... args)
 Concat words as string.
std::ostream & zypp::operator<< (std::ostream &str, MLSep &obj)
template<class TIterator>
std::ostream & zypp::dumpRange (std::ostream &str, TIterator begin, TIterator end, const std::string &intro="{", const std::string &pfx="\n ", const std::string &sep="\n ", const std::string &sfx="\n", const std::string &extro="}")
 Print range defined by iterators (multiline style).
template<class TIterator>
std::ostream & zypp::dumpRangeLine (std::ostream &str, TIterator begin, TIterator end)
 Print range defined by iterators (single line style).
template<class TContainer>
std::ostream & zypp::dumpRangeLine (std::ostream &str, const TContainer &cont)
template<class TIterator>
iomanip::RangeLine< TIterator > zypp::rangeLine (TIterator begin, TIterator end)
 Iomanip printing dumpRangeLine style.
template<class TContainer>
auto zypp::rangeLine (const TContainer &cont) -> decltype(rangeLine(cont.begin(), cont.end()))
template<class Tp>
std::ostream & std::operator<< (std::ostream &str, const std::vector< Tp > &obj)
template<class Tp, class TCmp, class TAlloc>
std::ostream & std::operator<< (std::ostream &str, const std::set< Tp, TCmp, TAlloc > &obj)
template<class Tp>
std::ostream & std::operator<< (std::ostream &str, const std::unordered_set< Tp > &obj)
template<class Tp>
std::ostream & std::operator<< (std::ostream &str, const std::multiset< Tp > &obj)
template<class Tp>
std::ostream & std::operator<< (std::ostream &str, const std::list< Tp > &obj)
template<class Tp>
std::ostream & zypp::operator<< (std::ostream &str, const Iterable< Tp > &obj)
template<class TKey, class Tp>
std::ostream & std::operator<< (std::ostream &str, const std::map< TKey, Tp > &obj)
template<class TKey, class Tp>
std::ostream & std::operator<< (std::ostream &str, const std::unordered_map< TKey, Tp > &obj)
template<class TKey, class Tp>
std::ostream & std::operator<< (std::ostream &str, const std::multimap< TKey, Tp > &obj)
std::ostream & std::operator<< (std::ostream &str, const std::basic_ios< char > &obj)
 Print stream status bits.
template<class Tp>
std::ostream & zypp::detail::operator<< (std::ostream &str, const Dump< Tp > &obj)
template<class Tp>
detail::Dump< Tp > zypp::dump (const Tp &obj_r)
std::ostream & zypp::hexdumpOn (std::ostream &outs, const unsigned char *ptr, size_t size)
 hexdump data on stream
std::ostream & zypp::hexdumpOn (std::ostream &outs, const char *ptr, size_t size)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
std::ostream & std::operator<< (std::ostream &str, const std::type_info &info)
template<class TPair>
MapEntry< TPair > zypp::mapEntry (const TPair &pair_r)
 Convenience function to create MapEntry from std::pair.
template<class TMap>
DumpMap< TMap > zypp::dumpMap (const TMap &map_r)
 Convenience function to create DumpMap from std::map.
template<class TMap>
DumpKeys< TMap > zypp::dumpKeys (const TMap &map_r)
 Convenience function to create DumpKeys from std::map.
template<class TMap>
DumpValues< TMap > zypp::dumpValues (const TMap &map_r)
 Convenience function to create DumpValues from std::map.

Variables

constexpr NoPrint zypp::str::noPrint
constexpr auto zypp::str::FormatConcat = makeJoinFormat( noPrint, noPrint, noPrint, noPrint, noPrint )
 Concatenated.
constexpr auto zypp::str::FormatWords = makeJoinFormat( noPrint, noPrint, " ", noPrint, noPrint )
 ' '-separated.
constexpr auto zypp::str::FormatLine = makeJoinFormat( noPrint, noPrint, " ", noPrint, "\n" )
 ' '-separated and NL-terminated!
constexpr auto zypp::str::FormatList = makeJoinFormat( noPrint, noPrint, "\n", "\n", noPrint )
 One item per line NL-terminated!
constexpr auto zypp::str::FormatTuple = makeJoinFormat( "(", noPrint, ", ", noPrint, ")" )
 Tuple: (el, .., el).
constexpr auto zypp::str::FormatDumpRangeDefault = makeJoinFormat( "{", "\n ", "\n ", "\n", "}" )
 dumpRange default format: {}-enclosed and indented one item per line.

Macro Definition Documentation

◆ pXXX

Definition at line 303 of file LogTools.h.

◆ pDBG

Definition at line 304 of file LogTools.h.

◆ pMIL

Definition at line 305 of file LogTools.h.

◆ pWAR

Definition at line 306 of file LogTools.h.

◆ pERR

Definition at line 307 of file LogTools.h.

◆ pSEC

Definition at line 308 of file LogTools.h.

◆ pINT

Definition at line 309 of file LogTools.h.

◆ pUSR

Definition at line 310 of file LogTools.h.

◆ wXXX

Definition at line 312 of file LogTools.h.

◆ wDBG

Definition at line 313 of file LogTools.h.

◆ wMIL

Definition at line 314 of file LogTools.h.

◆ wWAR

Definition at line 315 of file LogTools.h.

◆ wERR

Definition at line 316 of file LogTools.h.

◆ wSEC

Definition at line 317 of file LogTools.h.

◆ wINT

Definition at line 318 of file LogTools.h.

◆ wUSR

Definition at line 319 of file LogTools.h.