You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2015/07/23 08:49:31 UTC
[3/3] incubator-singa git commit: SINGA-36 Clean ModelProto,
ClusterProto, JobProto and driver program
SINGA-36 Clean ModelProto, ClusterProto, JobProto and driver program
change singatool glog output
* all logs will be directed to stderr
* log level is LOG_ERROR
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/c3a248a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/c3a248a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/c3a248a4
Branch: refs/heads/master
Commit: c3a248a4b66e80e8c7c97778ea576bd09feaa412
Parents: 0478e8c
Author: wang sheng <wa...@gmail.com>
Authored: Thu Jul 23 14:45:33 2015 +0800
Committer: wang sheng <wa...@gmail.com>
Committed: Thu Jul 23 14:45:33 2015 +0800
----------------------------------------------------------------------
src/utils/tool.cc | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/c3a248a4/src/utils/tool.cc
----------------------------------------------------------------------
diff --git a/src/utils/tool.cc b/src/utils/tool.cc
index 3ffd0e8..8e35997 100644
--- a/src/utils/tool.cc
+++ b/src/utils/tool.cc
@@ -6,29 +6,30 @@
#include "proto/singa.pb.h"
#include "utils/common.h"
#ifndef GFLAGS_GFLAGS_H_
- namespace gflags = google;
+namespace gflags = google;
#endif // GFLAGS_GFLAGS_H_
DEFINE_string(global, "conf/singa.conf", "Global config file");
int main(int argc, char **argv) {
google::InitGoogleLogging(argv[0]);
+ // set logging level to ERROR and log to STDERR
+ FLAGS_logtostderr = 1;
+ FLAGS_minloglevel = 2;
gflags::ParseCommandLineFlags(&argc, &argv, true);
singa::SingaProto global;
singa::ReadProtoFromTextFile(FLAGS_global.c_str(), &global);
- singa::SetupLog(global.log_dir(), "SingaTool");
-
LOG(INFO) << "The global config is \n" << global.DebugString();
singa::JobManager mng(global.zookeeper_host());
std::string usage = "singatool usage:\n"
- "./singatool create : generate a unique job id\n"
- "./singatool list : list running singa jobs\n"
- "./singatool view JOB_ID : view procs of a singa job\n"
- "./singatool clean JOB_ID : clean a job path in zookeeper\n"
- "./singatool cleanup : clean all singa data in zookeeper\n"
- "./singatool listall : list all singa jobs\n";
+ "# ./singatool create : generate a unique job id\n"
+ "# ./singatool list : list running singa jobs\n"
+ "# ./singatool view JOB_ID : view procs of a singa job\n"
+ "# ./singatool clean JOB_ID : clean a job path in zookeeper\n"
+ "# ./singatool cleanup : clean all singa data in zookeeper\n"
+ "# ./singatool listall : list all singa jobs\n";
if (argc <= 1) {
LOG(ERROR) << usage;
return 1;