From d1d79298308e706cba9a329b47cb386b62761d56 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 19 Jul 2021 01:11:09 +0000 Subject: [PATCH] declared mio_logbfmtv() and mio_logufmtv() in mio.h --- mio/lib/mio.h | 16 ++++++++++++++++ mio/lib/sys-log.c | 6 ------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/mio/lib/mio.h b/mio/lib/mio.h index 0c86fce..be08cb4 100644 --- a/mio/lib/mio.h +++ b/mio/lib/mio.h @@ -1323,11 +1323,27 @@ MIO_EXPORT mio_ooi_t mio_logufmt ( const mio_uch_t* fmt, ... ); + +MIO_EXPORT mio_ooi_t mio_logbfmtv ( + mio_t* mio, + mio_bitmask_t mask, + const mio_bch_t* fmt, + va_list ap +); + +MIO_EXPORT mio_ooi_t mio_logufmtv ( + mio_t* mio, + mio_bitmask_t mask, + const mio_uch_t* fmt, + va_list ap +); #if defined(MIO_OOCH_IS_UCH) # define mio_logoofmt mio_logufmt +# define mio_logoofmtv mio_logufmtv #else # define mio_logoofmt mio_logbfmt +# define mio_logoofmtv mio_logbfmtv #endif /* ========================================================================= diff --git a/mio/lib/sys-log.c b/mio/lib/sys-log.c index b162f26..2767029 100644 --- a/mio/lib/sys-log.c +++ b/mio/lib/sys-log.c @@ -339,12 +339,6 @@ int mio_sys_initlog (mio_t* mio) if (isatty(log->fd)) log->fd_flag |= LOGFD_TTY; #endif -/* - mio_bitmask_t logmask; - logmask = MIO_LOG_ALL_TYPES | MIO_LOG_ALL_LEVELS; - mio_setoption (mio, MIO_LOG_MASK, &logmask); -*/ - pthread_mutex_init (&log->mtx, MIO_NULL); return 0; }