Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Logging UI fixes.

git-svn-id: https://svn.apache.org/repos/asf/incubator/mesos/trunk@1307037 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 211ec6263fbcbdf5217b02db3db81e22d751696d 1 parent 941c7c0
authored March 29, 2012
4  bin/mesos-build-env.sh.in
@@ -21,12 +21,8 @@
21 21
 
22 22
 MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui
23 23
 MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
24  
-MESOS_LOG_DIR=${MESOS_LOG_DIR:-/var/tmp/mesos-dev-logs}
25  
-MESOS_WORK_DIR=${MESOS_WORK_DIR:-/var/tmp/mesos-dev-work}
26 24
 MESOS_KILLTREE=@abs_top_srcdir@/src/scripts/killtree.sh
27 25
 
28 26
 export MESOS_WEBUI_DIR
29 27
 export MESOS_LAUNCHER_DIR
30  
-export MESOS_LOG_DIR
31  
-export MESOS_WORK_DIR
32 28
 export MESOS_KILLTREE
2  src/common/logging.cpp
@@ -69,7 +69,7 @@ void Logging::init(const char* programName, const Configuration& conf)
69 69
     google::SetStderrLogging(google::INFO);
70 70
   }
71 71
 
72  
-  LOG(INFO) << "Logging to " << FLAGS_logtostderr ? "<stderr>" : FLAGS_log_dir;
  72
+  LOG(INFO) << "Logging to " << (FLAGS_logtostderr ? "<stderr>" : FLAGS_log_dir);
73 73
 }
74 74
 
75 75
 
4  src/webui/master/index.tpl
@@ -80,8 +80,12 @@
80 80
 
81 81
 <p>
82 82
   Log:
  83
+% if log_dir != "":
83 84
   <a href="/log/INFO/100">[last 100 lines]</a>
84 85
   <a href="/log/INFO">[full]</a>
  86
+% else:
  87
+  Logging to a file is not enabled, please set the 'log_dir' option.
  88
+% end
85 89
 </p>
86 90
 
87 91
 <h2>Resources</h2>
2  src/webui/master/webui.py
@@ -48,7 +48,7 @@
48 48
 @route('/')
49 49
 def index():
50 50
   bottle.TEMPLATES.clear() # For rapid development
51  
-  return template("index", master_port = master_port)
  51
+  return template("index", master_port = master_port, log_dir = log_dir)
52 52
 
53 53
 
54 54
 @route('/framework/:id#[0-9-]*#')
4  src/webui/slave/index.tpl
@@ -42,8 +42,12 @@
42 42
 
43 43
 <p>
44 44
   Log:
  45
+% if log_dir != "":
45 46
   <a href="/log/INFO/100">[last 100 lines]</a>
46 47
   <a href="/log/INFO">[full]</a>
  48
+% else:
  49
+  Logging to a file is not enabled, please set the 'log_dir' option.
  50
+% end
47 51
 </p>
48 52
 
49 53
 <h2>Frameworks</h2>
2  src/webui/slave/webui.py
@@ -54,7 +54,7 @@
54 54
 @route('/')
55 55
 def index():
56 56
   bottle.TEMPLATES.clear() # For rapid development
57  
-  return template("index", slave_port = slave_port)
  57
+  return template("index", slave_port = slave_port, log_dir = log_dir)
58 58
 
59 59
 
60 60
 @route('/framework/:id#.*#')

0 notes on commit 211ec62

Please sign in to comment.
Something went wrong with that request. Please try again.