compressLogs method

Future<String> compressLogs()

~english Compresses the debug log into a gzip archive.

Best practice is to delete this debug archive as soon as it is no longer used.

Return The path of the compressed gzip file.

Throws A description of the exception. See ChatError. ~end

~chinese 压缩 log 文件,并返回压缩后的文件路径。强烈建议方法完成之后删除该压缩文件。

Return 压缩后的 log 文件路径。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end

Implementation

Future<String> compressLogs() async {
  EMLog.v('compressLogs:');
  Map result = await ClientChannel.invokeMethod(ChatMethodKeys.compressLogs);
  try {
    ChatError.hasErrorFromResult(result);
    return result[ChatMethodKeys.compressLogs];
  } on ChatError catch (e) {
    throw e;
  }
}