enableLogToFile static method
- bool enabled
是否把 SDK 日志写入本地文件。建议开发调试时打开,生产环境关闭。
必须在创建 TencentLocationManager 实例之前调用,否则不生效。
Platforms:
- 🅰️ Android:支持,写入
/sdcard/Android/data/<应用包名>/files/t_log/目录 - 🍏 iOS:不支持,抛出
TencentLocationError(错误码unsupportedOnThisPlatform) - 🔶 Harmony:支持,写入
data/app/el2/100/base/<应用包名>/haps/entry/files/TencentLocation/t_log/目录
Parameters:
enabled:true开启日志文件写入,false关闭。
Implementation
static Future<void> enableLogToFile(bool enabled) => _platform.enableLogToFile(enabled);