indexing log: fix idx/daemlogfilename not working as expected
This commit is contained in:
parent
92e172cad0
commit
9481bc1ab4
@ -248,7 +248,7 @@ void recoll_exitready()
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RclConfig *recollinit(RclInitFlags flags,
|
RclConfig *recollinit(int flags,
|
||||||
void (*cleanup)(void), void (*sigcleanup)(int),
|
void (*cleanup)(void), void (*sigcleanup)(int),
|
||||||
string &reason, const string *argcnf)
|
string &reason, const string *argcnf)
|
||||||
{
|
{
|
||||||
@ -281,10 +281,14 @@ RclConfig *recollinit(RclInitFlags flags,
|
|||||||
config->getConfParam(string("daemlogfilename"), logfilename);
|
config->getConfParam(string("daemlogfilename"), logfilename);
|
||||||
config->getConfParam(string("daemloglevel"), loglevel);
|
config->getConfParam(string("daemloglevel"), loglevel);
|
||||||
}
|
}
|
||||||
if ((flags & RCLINIT_IDX) && logfilename.empty())
|
if (flags & RCLINIT_IDX) {
|
||||||
config->getConfParam(string("idxlogfilename"), logfilename);
|
if (logfilename.empty()) {
|
||||||
if ((flags & RCLINIT_IDX) && loglevel.empty())
|
config->getConfParam(string("idxlogfilename"), logfilename);
|
||||||
config->getConfParam(string("idxloglevel"), loglevel);
|
}
|
||||||
|
if (loglevel.empty()) {
|
||||||
|
config->getConfParam(string("idxloglevel"), loglevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (logfilename.empty())
|
if (logfilename.empty())
|
||||||
config->getConfParam(string("logfilename"), logfilename);
|
config->getConfParam(string("logfilename"), logfilename);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class RclConfig;
|
|||||||
* @return the parsed configuration.
|
* @return the parsed configuration.
|
||||||
*/
|
*/
|
||||||
enum RclInitFlags {RCLINIT_NONE = 0, RCLINIT_DAEMON = 1, RCLINIT_IDX = 2};
|
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),
|
void (*cleanup)(void), void (*sigcleanup)(int),
|
||||||
std::string& reason, const string *argcnf = 0);
|
std::string& reason, const string *argcnf = 0);
|
||||||
inline RclConfig *recollinit(void (*cleanup)(void), void (*sigcleanup)(int),
|
inline RclConfig *recollinit(void (*cleanup)(void), void (*sigcleanup)(int),
|
||||||
|
|||||||
@ -624,8 +624,10 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
string reason;
|
string reason;
|
||||||
RclInitFlags flags = (op_flags & OPT_m) && !(op_flags&OPT_D) ?
|
int flags = RCLINIT_IDX;
|
||||||
RCLINIT_DAEMON : RCLINIT_IDX;
|
if ((op_flags & OPT_m) && !(op_flags&OPT_D)) {
|
||||||
|
flags |= RCLINIT_DAEMON;
|
||||||
|
}
|
||||||
config = recollinit(flags, cleanup, sigcleanup, reason, &a_config);
|
config = recollinit(flags, cleanup, sigcleanup, reason, &a_config);
|
||||||
if (config == 0 || !config->ok()) {
|
if (config == 0 || !config->ok()) {
|
||||||
addIdxReason("init", reason);
|
addIdxReason("init", reason);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user