Skip to content

Commit

Permalink
Logging UI fixes.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/incubator/mesos/trunk@1307037 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
benh committed Mar 29, 2012
1 parent 941c7c0 commit 211ec62
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 0 additions & 4 deletions bin/mesos-build-env.sh.in
Expand Up @@ -21,12 +21,8 @@


MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui MESOS_WEBUI_DIR=@abs_top_srcdir@/src/webui
MESOS_LAUNCHER_DIR=@abs_top_builddir@/src MESOS_LAUNCHER_DIR=@abs_top_builddir@/src
MESOS_LOG_DIR=${MESOS_LOG_DIR:-/var/tmp/mesos-dev-logs}
MESOS_WORK_DIR=${MESOS_WORK_DIR:-/var/tmp/mesos-dev-work}
MESOS_KILLTREE=@abs_top_srcdir@/src/scripts/killtree.sh MESOS_KILLTREE=@abs_top_srcdir@/src/scripts/killtree.sh


export MESOS_WEBUI_DIR export MESOS_WEBUI_DIR
export MESOS_LAUNCHER_DIR export MESOS_LAUNCHER_DIR
export MESOS_LOG_DIR
export MESOS_WORK_DIR
export MESOS_KILLTREE export MESOS_KILLTREE
2 changes: 1 addition & 1 deletion src/common/logging.cpp
Expand Up @@ -69,7 +69,7 @@ void Logging::init(const char* programName, const Configuration& conf)
google::SetStderrLogging(google::INFO); google::SetStderrLogging(google::INFO);
} }


LOG(INFO) << "Logging to " << FLAGS_logtostderr ? "<stderr>" : FLAGS_log_dir; LOG(INFO) << "Logging to " << (FLAGS_logtostderr ? "<stderr>" : FLAGS_log_dir);
} }




Expand Down
4 changes: 4 additions & 0 deletions src/webui/master/index.tpl
Expand Up @@ -80,8 +80,12 @@


<p> <p>
Log: Log:
% if log_dir != "":
<a href="/log/INFO/100">[last 100 lines]</a> <a href="/log/INFO/100">[last 100 lines]</a>
<a href="/log/INFO">[full]</a> <a href="/log/INFO">[full]</a>
% else:
Logging to a file is not enabled, please set the 'log_dir' option.
% end
</p> </p>


<h2>Resources</h2> <h2>Resources</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/webui/master/webui.py
Expand Up @@ -48,7 +48,7 @@
@route('/') @route('/')
def index(): def index():
bottle.TEMPLATES.clear() # For rapid development bottle.TEMPLATES.clear() # For rapid development
return template("index", master_port = master_port) return template("index", master_port = master_port, log_dir = log_dir)




@route('/framework/:id#[0-9-]*#') @route('/framework/:id#[0-9-]*#')
Expand Down
4 changes: 4 additions & 0 deletions src/webui/slave/index.tpl
Expand Up @@ -42,8 +42,12 @@


<p> <p>
Log: Log:
% if log_dir != "":
<a href="/log/INFO/100">[last 100 lines]</a> <a href="/log/INFO/100">[last 100 lines]</a>
<a href="/log/INFO">[full]</a> <a href="/log/INFO">[full]</a>
% else:
Logging to a file is not enabled, please set the 'log_dir' option.
% end
</p> </p>


<h2>Frameworks</h2> <h2>Frameworks</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/webui/slave/webui.py
Expand Up @@ -54,7 +54,7 @@
@route('/') @route('/')
def index(): def index():
bottle.TEMPLATES.clear() # For rapid development bottle.TEMPLATES.clear() # For rapid development
return template("index", slave_port = slave_port) return template("index", slave_port = slave_port, log_dir = log_dir)




@route('/framework/:id#.*#') @route('/framework/:id#.*#')
Expand Down

0 comments on commit 211ec62

Please sign in to comment.