自定义日志打印(LogInfo)
[Player Network SDK & MSDK] 自定义日志打印接口,用于记录一些关键的业务调试信息,可以更全面地反映 app 发生崩溃或异常的上下文环境。
支持渠道:Firebase,CrashSight
支持的平台
- Unity
- Unreal Engine
支持
Android, iOS, Windows 平台。支持
Android, iOS, Windows 平台。注意
MSDK 暂不支持 Windows
函数定义
- Unity
- Unreal Engine
void LogInfo(int level, string tag, string log);
static void LogInfo(int level, const std::string &tag, const std::string &log);
入参说明
- Unity
- Unreal Engine
| 参数 | 类型 | 说明 |
|---|---|---|
| level | int | 日志级别 0-silent 1-error 2-warning 3-inifo 4-debug 5-verbose |
| tag | string | 日志模块分类 |
| log | string | 日志内容 |
| 参数 | 类型 | 说明 |
|---|---|---|
| level | int | 日志级别 0-silent 1-error 2-warning 3-inifo 4-debug 5-verbose |
| tag | std::string | 日志模块分类 |
| log | std::string | 日志内容 |
代码示例
- Unity
- Unreal Engine
UnionAdapterAPI.GetCrashService().LogInfo(1, "tag", "log");
GUA_NAMESPACE::GUACrashService::LogInfo(1, "Tag", "Log");