summaryrefslogtreecommitdiffstats
path: root/src/global
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-12-11 01:41:19 +0100
committerSage Weil <sage@inktank.com>2012-12-11 01:41:19 +0100
commita50c7d3b2f9eaca53a96f7942eaa203a849b3317 (patch)
tree591d559448091b9b2e8e64161ce345c534b06dd1 /src/global
parentconfig: always complain about config parse errors (diff)
downloadceph-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.cc5
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;