Browse Source

Consistently prefix warning messages

pull/1/head
Daniel Scharrer 14 years ago
parent
commit
fe77ebd2eb
  1. 6
      src/cli/main.cpp
  2. 2
      src/util/log.cpp
  3. 2
      src/util/storedenum.hpp

6
src/cli/main.cpp

@ -346,9 +346,9 @@ static void process_file(const fs::path & file, const options & o) {
}
if(checksum != file.checksum) {
log_warning << "checksum mismatch:";
log_warning << "actual: " << checksum;
log_warning << "expected: " << file.checksum;
log_warning << "checksum mismatch:\n"
<< "actual: " << checksum << '\n'
<< "expected: " << file.checksum;
if(o.test) {
throw new std::runtime_error("integrity test failed");
}

2
src/util/log.cpp

@ -38,7 +38,7 @@ logger::~logger() {
case Debug: std::cout << color::cyan << buffer.str() << std::endl; break;
case Info: std::cout << color::white << buffer.str() << std::endl; break;
case Warning: {
std::cerr << color::yellow << buffer.str() << std::endl;
std::cerr << color::yellow << "warning: " << buffer.str() << std::endl;
total_warnings++;
break;
}

2
src/util/storedenum.hpp

@ -77,7 +77,7 @@ public:
return Mapping::values[value];
}
log_warning << "warning: unexpected " << enum_names<enum_type>::name << " value: " << value;
log_warning << "unexpected " << enum_names<enum_type>::name << " value: " << value;
return Mapping::default_value;
}

Loading…
Cancel
Save