serialize method

void serialize(
  1. ByteDataWriter writer
)

Implementation

void serialize(ByteDataWriter writer) {
  // Serializes a message object of type Log
  // Serialize message field [header]
  header.serialize(writer);
  // Serialize message field [level]
  writer.writeUint8(level);
  // Serialize message field [name]
  writer.writeString(name);
  // Serialize message field [msg]
  writer.writeString(msg);
  // Serialize message field [file]
  writer.writeString(file);
  // Serialize message field [function]
  writer.writeString(function);
  // Serialize message field [line]
  writer.writeUint32(line);
  // Serialize message field [topics]
  writer.writeArray<String>(topics, (val) => writer.writeString(val), specArrayLen: null);
}