Issue 336 2

These patches consolidate the parse of command line options to ConfigManager.
In addition, it also parses a configuration file.
In general, a program tries to read configuration from various places such
as
/etc/xxx.conf, ~/.xxx.conf, ...
I think absence of  some of them should not be handled as an error.


2014-08-12 11:37 GMT+09:00 Kouhei Sutou <notifications@github.com>:

> In server/src/ConfigManager.cc:
>
> > +		if (path.empty())
> > +			return false;
> > +
> > +		GKeyFile *keyFile = g_key_file_new();
> > +		if (!keyFile) {
> > +			MLPL_CRIT("Failed to call g_key_file_new().\n");
> > +			return false;
> > +		}
> > +		Reaper<GKeyFile> keyFileReaper(keyFile, g_key_file_unref);
> > +
> > +		GError *error = NULL;
> > +		gboolean succeeded =
> > +		  g_key_file_load_from_file(keyFile, path.c_str(),
> > +		                            G_KEY_FILE_NONE, &error);
> > +		if (!succeeded) {
> > +			MLPL_DBG("Failed to load config file: %s (%s)\n",
>
> How about using MLPL_ERR instead of MLPL_DBG?
> It seems that the situation is error situation.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/project-hatohol/hatohol/pull/365/files#r16093134>.
>