Check RECOLL_LOGDATE environment variable to add date stamps to the debug log. Closes issue #246

This commit is contained in:
Jean-Francois Dockes 2015-05-17 08:59:19 +02:00
parent a6e1ebd92c
commit cec5ea02c8
2 changed files with 8 additions and 1 deletions

View file

@ -77,6 +77,9 @@ RclConfig *recollinit(RclInitFlags flags,
DebugLog::getdbl()->setloglevel(DEBDEB1);
DebugLog::setfilename("stderr");
if (getenv("RECOLL_LOGDATE"))
DebugLog::getdbl()->logdate(1);
RclConfig *config = new RclConfig(argcnf);
if (!config || !config->ok()) {
reason = "Configuration could not be built:\n";

View file

@ -398,10 +398,14 @@ DebugLog *getdbl()
#else /* TEST_DEBUGLOG */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "debuglog.h"
#if DEBUGLOG_USE_THREADS
#define TEST_THREADS
//#define TEST_THREADS
#endif
#ifdef TEST_THREADS