diff options
author | Sage Weil <sage@inktank.com> | 2012-12-11 01:41:19 +0100 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-12-11 01:41:19 +0100 |
commit | a50c7d3b2f9eaca53a96f7942eaa203a849b3317 (patch) | |
tree | 591d559448091b9b2e8e64161ce345c534b06dd1 /src/global | |
parent | config: always complain about config parse errors (diff) | |
download | ceph-a50c7d3b2f9eaca53a96f7942eaa203a849b3317.tar.xz ceph-a50c7d3b2f9eaca53a96f7942eaa203a849b3317.zip |
config: do not always print config file missing errors
Do not generate errors each time we fail to open a config file; only
generate one at the end if a search path was specified and none were
usable, right before we (already) exit. This avoids spamming stderr
about each path we tried in the search list before we found a good one.
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'src/global')
-rw-r--r-- | src/global/global_init.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/global/global_init.cc b/src/global/global_init.cc index 0182fb0ccaa..43ce0909565 100644 --- a/src/global/global_init.cc +++ b/src/global/global_init.cc @@ -82,7 +82,10 @@ void global_init(std::vector < const char * > *alt_def_args, std::vector < const else if (ret == -EINVAL) { if (!(flags & CINIT_FLAG_NO_DEFAULT_CONFIG_FILE)) { if (conf_file_list.length()) { - dout_emergency("global_init: unable to open config file.\n"); + ostringstream oss; + oss << "global_init: unable to open config file from search list " + << conf_file_list << "\n"; + dout_emergency(oss.str()); _exit(1); } else { derr <<"did not load config file, using default settings." << dendl; |