changed some error messages

This commit is contained in:
hyunghwan.chung 2018-02-02 16:32:15 +00:00
parent 8675512e30
commit ea70db9633
2 changed files with 7 additions and 4 deletions

View File

@ -1281,7 +1281,7 @@ static int delete_from_sem_io (moo_t* moo, moo_oop_semaphore_t sem, int force)
moo_poptmp (moo); moo_poptmp (moo);
if (x <= -1) if (x <= -1)
{ {
MOO_LOG3 (moo, MOO_LOG_WARN, "Failed to delete an IO semaphore at index %zd of type %d on handle %zd\n", index, (int)io_type, io_handle); MOO_LOG3 (moo, MOO_LOG_WARN, "Failed to delete an IO semaphored handle %zd at index %zd of type %d\n", io_handle, index, (int)io_type);
if (!force) return -1; if (!force) return -1;
/* NOTE: /* NOTE:
@ -1290,10 +1290,13 @@ static int delete_from_sem_io (moo_t* moo, moo_oop_semaphore_t sem, int force)
* assuming the callback works correctly, it's not likely that the * assuming the callback works correctly, it's not likely that the
* underlying operating system returns failure for no reason. * underlying operating system returns failure for no reason.
* i should inspect the overall vm implementation */ * i should inspect the overall vm implementation */
MOO_LOG3 (moo, MOO_LOG_ERROR, "Forcibly unmapping the handle %zd despite failure\n", index, (int)io_type, io_handle); MOO_LOG1 (moo, MOO_LOG_ERROR, "Forcibly unmapping the IO semaphored handle %zd as if it's deleted\n", io_handle);
}
else
{
MOO_LOG3 (moo, MOO_LOG_DEBUG, "Deleted an IO semaphored handle %zd at index %zd of type %d\n", io_handle, index, (int)io_type);
} }
MOO_LOG3 (moo, MOO_LOG_DEBUG, "Deleted an IO semaphore at index %zd of type %d on handle %zd\n", index, (int)io_type, io_handle);
sem->io_index = moo->_nil; sem->io_index = moo->_nil;
sem->io_type = moo->_nil; sem->io_type = moo->_nil;
sem->io_handle = moo->_nil; sem->io_handle = moo->_nil;

View File

@ -798,7 +798,7 @@ static void log_write (moo_t* moo, moo_oow_t mask, const moo_ooch_t* msg, moo_oo
if (xtn->logfd_istty) if (xtn->logfd_istty)
{ {
if (mask & MOO_LOG_FATAL) write_all (logfd, "\x1B[1;31m", 7); if (mask & MOO_LOG_FATAL) write_all (logfd, "\x1B[1;31m", 7);
else if (mask & MOO_LOG_ERROR) write_all (logfd, "\x1B[1;36m", 7); else if (mask & MOO_LOG_ERROR) write_all (logfd, "\x1B[1;32m", 7);
else if (mask & MOO_LOG_WARN) write_all (logfd, "\x1B[1;33m", 7); else if (mask & MOO_LOG_WARN) write_all (logfd, "\x1B[1;33m", 7);
} }