indexing log: fix idx/daemlogfilename not working as expected

This commit is contained in:
Jean-Francois Dockes
2018-04-13 14:31:33 +02:00
parent 92e172cad0
commit 9481bc1ab4
3 changed files with 14 additions and 8 deletions
+9 -5
View File
@@ -248,7 +248,7 @@ void recoll_exitready()
#endif
RclConfig *recollinit(RclInitFlags flags,
RclConfig *recollinit(int flags,
void (*cleanup)(void), void (*sigcleanup)(int),
string &reason, const string *argcnf)
{
@@ -281,10 +281,14 @@ RclConfig *recollinit(RclInitFlags flags,
config->getConfParam(string("daemlogfilename"), logfilename);
config->getConfParam(string("daemloglevel"), loglevel);
}
if ((flags & RCLINIT_IDX) && logfilename.empty())
config->getConfParam(string("idxlogfilename"), logfilename);
if ((flags & RCLINIT_IDX) && loglevel.empty())
config->getConfParam(string("idxloglevel"), loglevel);
if (flags & RCLINIT_IDX) {
if (logfilename.empty()) {
config->getConfParam(string("idxlogfilename"), logfilename);
}
if (loglevel.empty()) {
config->getConfParam(string("idxloglevel"), loglevel);
}
}
if (logfilename.empty())
config->getConfParam(string("logfilename"), logfilename);
+1 -1
View File
@@ -40,7 +40,7 @@ class RclConfig;
* @return the parsed configuration.
*/
enum RclInitFlags {RCLINIT_NONE = 0, RCLINIT_DAEMON = 1, RCLINIT_IDX = 2};
extern RclConfig *recollinit(RclInitFlags flags,
extern RclConfig *recollinit(int flags,
void (*cleanup)(void), void (*sigcleanup)(int),
std::string& reason, const string *argcnf = 0);
inline RclConfig *recollinit(void (*cleanup)(void), void (*sigcleanup)(int),