mirror of
https://github.com/ceph/ceph
synced 2025-01-19 01:21:49 +00:00
heap_profiler: if log_dir is empty, don't try and log to root dir!
If log_dir was empty then the prefix would be of the form /mon.a That isn't good, so fill it in so it writes to the current dir. Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
This commit is contained in:
parent
f41773bedc
commit
52e9e5ec33
@ -51,7 +51,8 @@ void ceph_heap_profiler_start()
|
||||
{
|
||||
char profile_name[PATH_MAX];
|
||||
snprintf(profile_name, sizeof(profile_name),
|
||||
"%s/%s", g_conf->log_dir.c_str(), g_conf->name.to_cstr());
|
||||
"%s/%s", g_conf->log_dir.empty() ? "." : g_conf->log_dir.c_str(),
|
||||
g_conf->name.to_cstr());
|
||||
generic_dout(0) << "turning on heap profiler with prefix "
|
||||
<< profile_name << dendl;
|
||||
HeapProfilerStart(profile_name);
|
||||
|
Loading…
Reference in New Issue
Block a user