Add int-type log operators

This commit is contained in:
TheAssassin 2018-06-20 21:14:30 +02:00
parent 03639f6cd9
commit 77ae6072d8
2 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,8 @@ namespace linuxdeploy {
ldLog operator<<(const std::string& message);
ldLog operator<<(const char* message);
ldLog operator<<(const boost::filesystem::path& path);
ldLog operator<<(const int val);
ldLog operator<<(const size_t val);
ldLog operator<<(const double val);
ldLog operator<<(stdEndlType strm);
ldLog operator<<(const LD_LOGLEVEL logLevel);

View File

@ -60,6 +60,14 @@ namespace linuxdeploy {
return ldLog(true, logLevelSet, currentLogLevel);
}
ldLog ldLog::operator<<(const int val) {
return ldLog::operator<<(std::to_string(val));
}
ldLog ldLog::operator<<(const size_t val) {
return ldLog::operator<<(std::to_string(val));
}
ldLog ldLog::operator<<(const double val) {
return ldLog::operator<<(std::to_string(val));
}