Files
Racoon-MinecraftConsoles/Minecraft.Client/Windows64/Windows64_Log.h
veroxsity de125e5275 Add TCP-over-WebSocket relay client for Minecraft
- Implemented Win64LceLiveRelay.h and Win64LceLiveSignaling.cpp to facilitate TCP-over-WebSocket communication for Minecraft, allowing game traffic to route through the LCELive relay server when direct TCP is blocked.
- Introduced signaling mechanisms for host and joiner connections, including session management and candidate exchange.
- Added logging functionality in Windows_Log.cpp and Windows_Log.h for better debugging and session tracking.
- Created build-release.bat script for streamlined build and deployment process, including exclusion of unnecessary files.
2026-04-17 23:47:32 +01:00

38 lines
1.2 KiB
C++

#pragma once
#ifdef _WINDOWS64
// ============================================================================
// LceLog — lightweight file logger
//
// Writes a timestamped latest.log next to the exe on every run.
// Any previous run's log is renamed to previous.log.
//
// All writes use fputs/fflush directly (never printf) so the logger works in
// every build configuration, including _FINAL_BUILD where printf is disabled.
// Stdout is also redirected to the file so existing printf debug output in
// non-final builds lands in the log automatically.
//
// Usage:
// LceLog::Init(); // call once, early in WinMain
// LceLog::Write("Connected to %s", ip); // any time
// LceLog::Shutdown(); // call once, at exit
//
// Convenience macro with a fixed category tag:
// LCELOG("RELAY", "host opened for session %s", sid.c_str());
// ============================================================================
#include <cstdarg>
namespace LceLog
{
void Init();
void Shutdown();
void Write(const char* fmt, ...);
}
#define LCELOG(category, fmt, ...) \
LceLog::Write("[" category "] " fmt, ##__VA_ARGS__)
#endif // _WINDOWS64