#include <stddef.h>
#include <dpl/mutex.h>
#include <dpl/assert.h>
-#include <dpl/log/log.h>
+#include <dpl/log/wrt_log.h>
#include <errno.h>
namespace DPL {
if (pthread_mutex_init(&m_mutex, NULL) != 0) {
int error = errno;
- LogPedantic("Failed to create mutex. Errno: " << error);
+ WrtLogD("Failed to create mutex. Errno: %i", error);
ThrowMsg(Exception::CreateFailed,
"Failed to create mutex. Errno: " << error);
if (pthread_mutex_destroy(&m_mutex) != 0) {
int error = errno;
- LogPedantic("Failed to destroy mutex. Errno: " << error);
+ WrtLogD("Failed to destroy mutex. Errno: %i", error);
}
}
if (pthread_mutex_lock(&m_mutex) != 0) {
int error = errno;
- LogPedantic("Failed to lock mutex. Errno: " << error);
+ WrtLogD("Failed to lock mutex. Errno: %i", error);
ThrowMsg(Exception::LockFailed,
"Failed to lock mutex. Errno: " << error);
if (pthread_mutex_unlock(&m_mutex) != 0) {
int error = errno;
- LogPedantic("Failed to unlock mutex. Errno: " << error);
+ WrtLogD("Failed to unlock mutex. Errno: %i", error);
ThrowMsg(Exception::UnlockFailed,
"Failed to unlock mutex. Errno: " << error);
}
Catch(Mutex::Exception::UnlockFailed)
{
- LogPedantic("Failed to leave mutex scoped lock");
+ WrtLogD("Failed to leave mutex scoped lock");
}
}
} // namespace DPL