diff --git a/moo/lib/exec.c b/moo/lib/exec.c index d386d2d..bbdc8cf 100644 --- a/moo/lib/exec.c +++ b/moo/lib/exec.c @@ -1281,7 +1281,7 @@ static int delete_from_sem_io (moo_t* moo, moo_oop_semaphore_t sem, int force) moo_poptmp (moo); 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; /* 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 * underlying operating system returns failure for no reason. * 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_type = moo->_nil; sem->io_handle = moo->_nil; diff --git a/moo/lib/main.c b/moo/lib/main.c index 827c9f8..0f8d2ec 100644 --- a/moo/lib/main.c +++ b/moo/lib/main.c @@ -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 (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); }