5 #include <boost/filesystem.hpp>
9 namespace linuxdeploy {
19 enum LD_STREAM_CONTROL {
26 // this is the type of std::cout
27 typedef std::basic_ostream<char, std::char_traits<char> > CoutType;
29 // this is the function signature of std::endl
30 typedef CoutType& (* stdEndlType)(CoutType&);
33 static LD_LOGLEVEL verbosity;
38 CoutType& stream = std::cout;
40 LD_LOGLEVEL currentLogLevel;
44 ldLog(bool prependSpace, bool logLevelSet, LD_LOGLEVEL logLevel);
46 void checkPrependSpace();
48 bool checkVerbosity();
51 static void setVerbosity(LD_LOGLEVEL verbosity);
55 // does not implement the advanced behavior -- see private constructors for that
59 ldLog operator<<(const std::string& message);
60 ldLog operator<<(const char* message);
61 ldLog operator<<(const boost::filesystem::path& path);
62 ldLog operator<<(const int val);
63 ldLog operator<<(const size_t val);
64 ldLog operator<<(const double val);
65 ldLog operator<<(stdEndlType strm);
66 ldLog operator<<(const LD_LOGLEVEL logLevel);
67 ldLog operator<<(const LD_STREAM_CONTROL streamControl);
69 void write(const char* s, const size_t n);