writeLog method

void writeLog(
  1. int level,
  2. String location,
  3. String tag,
  4. String message,
)

Implementation

void writeLog(int level, String location, String tag, String message) {
  ffi.Pointer<ffi.Char> locationPointer = location.toNativeUtf8().cast<ffi.Char>();
  ffi.Pointer<ffi.Char> tagPointer = tag.toNativeUtf8().cast<ffi.Char>();
  ffi.Pointer<ffi.Char> messagePointer = message.toNativeUtf8().cast<ffi.Char>();

  _trtcFFIBindings.write_log(level, locationPointer, tagPointer, messagePointer);

  calloc.free(locationPointer);
  calloc.free(tagPointer);
  calloc.free(messagePointer);
}