Enabled trace log in DEBUG=Y builds. Modified testlog-c accordingly.

This commit is contained in:
vraatikka 2013-08-09 10:01:34 +03:00
parent 58e6415c73
commit 43fb6b87f1
2 changed files with 7 additions and 2 deletions

View File

@ -252,6 +252,9 @@ static bool logmanager_init_nomutex(
lm->lm_logmes = skygw_message_init();
lm->lm_enabled_logfiles |= LOGFILE_ERROR;
lm->lm_enabled_logfiles |= LOGFILE_MESSAGE;
#if defined(SS_DEBUG)
lm->lm_enabled_logfiles |= LOGFILE_TRACE;
#endif
fn = &lm->lm_fnames_conf;
fw = &lm->lm_filewriter;
fn->fn_state = UNINIT;

View File

@ -238,12 +238,14 @@ int main(int argc, char* argv[])
#if defined(TEST3)
/**
/**
* Test enable/disable log.
*/
r = skygw_logmanager_init(argc, argv);
ss_dassert(r);
skygw_log_disable(LOGFILE_TRACE);
logstr = ("1.\tWrite to ERROR and MESSAGE logs.");
err = skygw_log_write(LOGFILE_MESSAGE, logstr);
ss_dassert(err == 0);