Tiny changes, more tests.
This commit is contained in:
parent
3ae8727582
commit
b82ee51b7a
@ -525,6 +525,8 @@ static void logfile_write_buffers(
|
||||
p += copylen;
|
||||
slen -= copylen;
|
||||
}
|
||||
/** Release log string */
|
||||
free(str);
|
||||
ss_dassert(slen == 0);
|
||||
ss_dassert(*p_wb == NULL);
|
||||
p_wb = p_data;
|
||||
|
@ -13,31 +13,28 @@ int main(int argc, char* argv[])
|
||||
|
||||
logstr = strdup("My name is Tracey");
|
||||
err = skygw_log_write(NULL, lmgr, LOGFILE_TRACE, logstr);
|
||||
free(logstr);
|
||||
|
||||
logstr = strdup("My name is Stacey");
|
||||
err = skygw_log_write_flush(NULL, lmgr, LOGFILE_TRACE, logstr);
|
||||
free(logstr);
|
||||
|
||||
skygw_logmanager_done(NULL, &lmgr);
|
||||
|
||||
logstr = strdup("My name is Philip");
|
||||
err = skygw_log_write(NULL, lmgr, LOGFILE_TRACE, logstr);
|
||||
free(logstr);
|
||||
|
||||
lmgr = skygw_logmanager_init(NULL, argc, argv);
|
||||
|
||||
logstr = strdup("A terrible error has occurred!");
|
||||
err = skygw_log_write_flush(NULL, lmgr, LOGFILE_ERROR, logstr);
|
||||
free(logstr);
|
||||
|
||||
logstr = strdup("Hi, how are you?");
|
||||
err = skygw_log_write(NULL, lmgr, LOGFILE_MESSAGE, logstr);
|
||||
free(logstr);
|
||||
|
||||
logstr = strdup("I'm doing fine!");
|
||||
err = skygw_log_write(NULL, lmgr, LOGFILE_MESSAGE, logstr);
|
||||
free(logstr);
|
||||
|
||||
logstr = strdup("I was wondering, you know, it has been such a lovely weather whole morning and I thought that would you like to come to my place and have a little piece of cheese with us. Just me and my mom - and you, of course. Then, if you wish, we could listen to the radio and keep company for our little Steven, my mom's cat, you see.");
|
||||
err = skygw_log_write(NULL, lmgr, LOGFILE_MESSAGE, logstr);
|
||||
|
||||
return_err:
|
||||
skygw_logmanager_done(NULL, &lmgr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user