output all logging from upgrade net tools
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Tue, 1 Mar 2016 05:13:27 +0000 (21:13 -0800)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Tue, 1 Mar 2016 05:22:15 +0000 (21:22 -0800)
output info, warnings, and errors for fuller description of the upgrade

tools/upgrade_net_proto_binary.cpp
tools/upgrade_net_proto_text.cpp
tools/upgrade_solver_proto_text.cpp

index 8a0dd7a..ede07ec 100644 (file)
@@ -16,6 +16,7 @@ using std::ofstream;
 using namespace caffe;  // NOLINT(build/namespaces)
 
 int main(int argc, char** argv) {
+  FLAGS_alsologtostderr = 1;  // Print output to stderr (while still logging)
   ::google::InitGoogleLogging(argv[0]);
   if (argc != 3) {
     LOG(ERROR) << "Usage: "
@@ -39,11 +40,11 @@ int main(int argc, char** argv) {
                  << "see details above.";
     }
   } else {
-    LOG(ERROR) << "File already in V1 proto format: " << argv[1];
+    LOG(ERROR) << "File already in latest proto format: " << input_filename;
   }
 
   WriteProtoToBinaryFile(net_param, argv[2]);
 
-  LOG(ERROR) << "Wrote upgraded NetParameter binary proto to " << argv[2];
+  LOG(INFO) << "Wrote upgraded NetParameter binary proto to " << argv[2];
   return !success;
 }
index 9200431..d8e84d6 100644 (file)
@@ -16,6 +16,7 @@ using std::ofstream;
 using namespace caffe;  // NOLINT(build/namespaces)
 
 int main(int argc, char** argv) {
+  FLAGS_alsologtostderr = 1;  // Print output to stderr (while still logging)
   ::google::InitGoogleLogging(argv[0]);
   if (argc != 3) {
     LOG(ERROR) << "Usage: "
@@ -50,6 +51,6 @@ int main(int argc, char** argv) {
   // Save new format prototxt.
   WriteProtoToTextFile(net_param, argv[2]);
 
-  LOG(ERROR) << "Wrote upgraded NetParameter text proto to " << argv[2];
+  LOG(INFO) << "Wrote upgraded NetParameter text proto to " << argv[2];
   return !success;
 }
index 7130232..ddff1ce 100644 (file)
@@ -16,6 +16,7 @@ using std::ofstream;
 using namespace caffe;  // NOLINT(build/namespaces)
 
 int main(int argc, char** argv) {
+  FLAGS_alsologtostderr = 1;  // Print output to stderr (while still logging)
   ::google::InitGoogleLogging(argv[0]);
   if (argc != 3) {
     LOG(ERROR) << "Usage: upgrade_solver_proto_text "
@@ -45,6 +46,6 @@ int main(int argc, char** argv) {
   // Save new format prototxt.
   WriteProtoToTextFile(solver_param, argv[2]);
 
-  LOG(ERROR) << "Wrote upgraded SolverParameter text proto to " << argv[2];
+  LOG(INFO) << "Wrote upgraded SolverParameter text proto to " << argv[2];
   return !success;
 }