refactor(log): remove deprecated utility/log.h

- Remove src/libipc/utility/log.h as it's no longer used
- All code has been migrated to use the new libipc/imp/log.h interface
- The old utility/log.h provided printf-style logging: ipc::log() and ipc::error()
- The new imp/log.h provides modern C++ stream-based logging with LIBIPC_LOG() macro
- Verified that there are no remaining references to utility/log.h in the codebase

This completes the log interface migration by removing the deprecated file.
This commit is contained in:
木头云 2025-12-18 03:34:24 +00:00
parent 3269bde1a5
commit d6e8f71780

View File

@ -1,39 +0,0 @@
#pragma once
#include <cstdio>
#include <utility>
namespace ipc {
namespace detail {
template <typename O>
void print(O out, char const * str) {
std::fprintf(out, "%s", str);
}
template <typename O, typename P1, typename... P>
void print(O out, char const * fmt, P1&& p1, P&&... params) {
std::fprintf(out, fmt, std::forward<P1>(p1), std::forward<P>(params)...);
}
} // namespace detail
inline void log(char const * fmt) {
ipc::detail::print(stdout, fmt);
}
template <typename P1, typename... P>
void log(char const * fmt, P1&& p1, P&&... params) {
ipc::detail::print(stdout, fmt, std::forward<P1>(p1), std::forward<P>(params)...);
}
inline void error(char const * str) {
ipc::detail::print(stderr, str);
}
template <typename P1, typename... P>
void error(char const * fmt, P1&& p1, P&&... params) {
ipc::detail::print(stderr, fmt, std::forward<P1>(p1), std::forward<P>(params)...);
}
} // namespace ipc