Skip to content

Commit 2ec1914

Browse files
committed
refactor(log): replace utility/log with imp/log in shm.cpp
- Replace include "libipc/utility/log.h" with "libipc/imp/log.h" - Replace ipc::error() calls with LIBIPC_LOG() + log.error() - Use type-safe streaming interface instead of printf-style formatting - Remove manual newline characters from log messages
1 parent 78bbb05 commit 2ec1914

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/libipc/shm.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "libipc/shm.h"
66

77
#include "libipc/utility/pimpl.h"
8-
#include "libipc/utility/log.h"
8+
#include "libipc/imp/log.h"
99
#include "libipc/mem/resource.h"
1010

1111
namespace ipc {
@@ -69,12 +69,13 @@ void handle::sub_ref() noexcept {
6969
}
7070

7171
bool handle::acquire(char const * name, std::size_t size, unsigned mode) {
72+
LIBIPC_LOG();
7273
if (!is_valid_string(name)) {
73-
ipc::error("fail acquire: name is empty\n");
74+
log.error("fail acquire: name is empty");
7475
return false;
7576
}
7677
if (size == 0) {
77-
ipc::error("fail acquire: size is 0\n");
78+
log.error("fail acquire: size is 0");
7879
return false;
7980
}
8081
release();

0 commit comments

Comments
 (0)