mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2026-01-01 03:12:13 +08:00
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
This commit is contained in:
parent
78bbb05322
commit
2ec1914691
@ -5,7 +5,7 @@
|
||||
#include "libipc/shm.h"
|
||||
|
||||
#include "libipc/utility/pimpl.h"
|
||||
#include "libipc/utility/log.h"
|
||||
#include "libipc/imp/log.h"
|
||||
#include "libipc/mem/resource.h"
|
||||
|
||||
namespace ipc {
|
||||
@ -69,12 +69,13 @@ void handle::sub_ref() noexcept {
|
||||
}
|
||||
|
||||
bool handle::acquire(char const * name, std::size_t size, unsigned mode) {
|
||||
LIBIPC_LOG();
|
||||
if (!is_valid_string(name)) {
|
||||
ipc::error("fail acquire: name is empty\n");
|
||||
log.error("fail acquire: name is empty");
|
||||
return false;
|
||||
}
|
||||
if (size == 0) {
|
||||
ipc::error("fail acquire: size is 0\n");
|
||||
log.error("fail acquire: size is 0");
|
||||
return false;
|
||||
}
|
||||
release();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user