载入中...
搜索中...
未找到
CrashLog.h
浏览该文件的文档.
1#pragma once
2
24#include "common/Export.h"
25
26#include <string>
27
28namespace eve {
29
39inline constexpr const char* kSessionStartMarker = "EVEngine session start";
40
46inline constexpr const char* kSessionEndMarker = "session end (exit code";
47
56EVENGINE_API_FOUNDATION void initSystemLogging(const std::string& logDir = {});
57
66EVENGINE_API_FOUNDATION void recordLogEvent(const std::string& level, const std::string& message);
67
76EVENGINE_API_FOUNDATION void recordCrashEvent(const std::string& report);
77
87
95EVENGINE_API void recordSessionEnd(int exitCode);
96
102
103} // namespace eve
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
#define EVENGINE_API
宿主(eve / libmain)导出宏;插件从进程导入同一批符号。
Definition Export.h:31
std::string message
int level
Build metadata (engine git commit, build time, third-party version).
Definition Build.cpp:16
void recordSessionEnd(int exitCode)
Appends the session-end marker carrying the process exit code.
Definition CrashLog.cpp:102
constexpr const char * kSessionStartMarker
Marker text that opens a session block in eve.log.
Definition CrashLog.h:39
constexpr const char * kSessionEndMarker
Marker text that closes a session block (followed by the exit code). @ownership Borrowed pointer to a...
Definition CrashLog.h:46
void recordSessionStart()
Appends a session-start marker.
Definition CrashLog.cpp:94
void initSystemLogging(const std::string &logDir)
Opens (append) the crash/error log file and records a session marker.
Definition CrashLog.cpp:64
void recordCrashEvent(const std::string &report)
Records a crash report, safe to call from a crash/exception handler.
Definition CrashLog.cpp:78
std::string crashLogPath()
Path of the open crash/error log file.
Definition CrashLog.cpp:89
void recordLogEvent(const std::string &level, const std::string &message)
Appends a timestamped event line to the crash/error log.
Definition CrashLog.cpp:70