Files
JuiceAgent/includes/ptrace-inject-cpp/src/log.h
T
xiaozhou233 d31e43af31 Refactor: Vendor ptrace-inject-cpp into includes
- ptrace-inject-cpp: remove the submodule, its .gitmodules entry and config section
- includes/ptrace-inject-cpp: add the injection library sources, public header and LICENSE
- includes/ptrace-inject-cpp: add CMakeLists defining the ptrace_inject static library
- cmake: build includes/ptrace-inject-cpp on non-Windows instead of the submodule
- docs: list the vendored library in the AGENTS.md layout
2026-10-24 23:02:50 +08:00

18 lines
542 B
C++

#pragma once
#include <string>
#include "ptrace_inject.h"
// Internal representation of ptrace_inject_options.
struct LogSink {
ptrace_inject_log_fn fn = nullptr;
void* user_data = nullptr;
};
// All of these do nothing when `sink` is null or `sink->fn` is null.
void log_message(const LogSink* sink, int level, const std::string& message);
void log_debug(const LogSink* sink, const std::string& message);
void log_info(const LogSink* sink, const std::string& message);
void log_warn(const LogSink* sink, const std::string& message);