some refactoring of qse_log_t related functions
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include <qse/cmn/test.h>
|
||||
#include <qse/cmn/mem.h>
|
||||
#include <qse/cmn/str.h>
|
||||
#include <qse/cmn/mbwc.h>
|
||||
#include <qse/si/sio.h>
|
||||
|
||||
#include <locale.h>
|
||||
@ -412,13 +413,13 @@ static int test18 (void)
|
||||
}
|
||||
|
||||
qse_str_ncat (s1, QSE_T("["), 1);
|
||||
qse_str_ncatwcs (s1, QSE_WT("hello"), 5);
|
||||
qse_str_ncatmbs (s1, QSE_MT("world"), 5);
|
||||
qse_str_ncatwcs (s1, QSE_WT("hello"), 5, qse_findcmgrbyid(QSE_CMGR_UTF8));
|
||||
qse_str_ncatmbs (s1, QSE_MT("world"), 5, qse_findcmgrbyid(QSE_CMGR_UTF8));
|
||||
qse_str_ncat (s1, QSE_T("]"), 1);
|
||||
|
||||
QSE_TESASSERT1 (QSE_STR_LEN(s1) == 12, QSE_T("wrong length of dynamic string"));
|
||||
|
||||
qse_str_ncatmbs (s1, QSE_MT("\xEB\xAC\xB4\xEB\xAC\xB4\xEB\xAC\xB4"), 9);
|
||||
qse_str_ncatmbs (s1, QSE_MT("\xEB\xAC\xB4\xEB\xAC\xB4\xEB\xAC\xB4"), 9, qse_findcmgrbyid(QSE_CMGR_UTF8));
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
QSE_TESASSERT1 (QSE_STR_LEN(s1) == 21, QSE_T("wrong length of dynamic string"));
|
||||
@ -426,7 +427,7 @@ static int test18 (void)
|
||||
QSE_TESASSERT1 (QSE_STR_LEN(s1) == 15, QSE_T("wrong length of dynamic string"));
|
||||
#endif
|
||||
|
||||
qse_str_ncatwcs (s1, QSE_WT("날아올라라"), 5);
|
||||
qse_str_ncatwcs (s1, QSE_WT("날아올라라"), 5, qse_findcmgrbyid(QSE_CMGR_UTF8));
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
QSE_TESASSERT1 (QSE_STR_LEN(s1) == 36, QSE_T("wrong length of dynamic string"));
|
||||
|
@ -47,7 +47,7 @@ static void t1_sub001 (qse_log_t* log)
|
||||
static void t1 (void)
|
||||
{
|
||||
qse_log_t* log;
|
||||
qse_log_target_t t;
|
||||
qse_log_target_data_t t;
|
||||
#if defined(QSE_HAVE_INT128_T)
|
||||
qse_int128_t q = 0x1234567890;
|
||||
#elif defined(QSE_HAVE_INT64_T)
|
||||
@ -79,7 +79,7 @@ static void t1 (void)
|
||||
|
||||
if (i == 4)
|
||||
{
|
||||
qse_log_target_t t2;
|
||||
qse_log_target_data_t t2;
|
||||
|
||||
qse_log_gettarget (log, &t2);
|
||||
qse_strtonwad (QSE_T("127.0.0.1:514"), &nwad);
|
||||
|
@ -86,6 +86,10 @@ public:
|
||||
signals.set (SIGUSR2);
|
||||
if (this->guardProcess(signals) > 0)
|
||||
{
|
||||
int target_flags;
|
||||
qse_log_target_data_t target_data;
|
||||
|
||||
this->setLogTarget (target_flags, target_data);
|
||||
this->setLogMask (MyApp::LOG_ALL_LEVELS | MyApp::LOG_ALL_TYPES);
|
||||
|
||||
QSE_APP_LOG0 (this, MyApp::LOG_INFO | MyApp::LOG_TYPE_0, QSE_T("Stareting server\n"));
|
||||
|
Reference in New Issue
Block a user