Check RECOLL_LOGDATE environment variable to add date stamps to the debug log. Closes issue #246
This commit is contained in:
parent
a6e1ebd92c
commit
cec5ea02c8
2 changed files with 8 additions and 1 deletions
|
@ -77,6 +77,9 @@ RclConfig *recollinit(RclInitFlags flags,
|
||||||
|
|
||||||
DebugLog::getdbl()->setloglevel(DEBDEB1);
|
DebugLog::getdbl()->setloglevel(DEBDEB1);
|
||||||
DebugLog::setfilename("stderr");
|
DebugLog::setfilename("stderr");
|
||||||
|
if (getenv("RECOLL_LOGDATE"))
|
||||||
|
DebugLog::getdbl()->logdate(1);
|
||||||
|
|
||||||
RclConfig *config = new RclConfig(argcnf);
|
RclConfig *config = new RclConfig(argcnf);
|
||||||
if (!config || !config->ok()) {
|
if (!config || !config->ok()) {
|
||||||
reason = "Configuration could not be built:\n";
|
reason = "Configuration could not be built:\n";
|
||||||
|
|
|
@ -398,10 +398,14 @@ DebugLog *getdbl()
|
||||||
#else /* TEST_DEBUGLOG */
|
#else /* TEST_DEBUGLOG */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "debuglog.h"
|
#include "debuglog.h"
|
||||||
|
|
||||||
#if DEBUGLOG_USE_THREADS
|
#if DEBUGLOG_USE_THREADS
|
||||||
#define TEST_THREADS
|
//#define TEST_THREADS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TEST_THREADS
|
#ifdef TEST_THREADS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue