AWSDDFileLogMessageSerializer

Objective-C

@protocol AWSDDFileLogMessageSerializer <NSObject>

Swift

protocol AWSDDFileLogMessageSerializer : NSObjectProtocol

The serializer is responsible for turning a log message into binary for writing into a file. It allows storing log messages in a non-text format. The serialier should not be used for filtering or formatting messages! Also, it must be fast!

  • Returns the binary representation of the message.

    Note

    The message parameter should not be used for formatting! It should simply be used to extract the necessary metadata for serializing.

    Declaration

    Objective-C

    - (nonnull NSData *)dataForString:(nonnull NSString *)string
               originatingFromMessage:(nullable AWSDDLogMessage *)message;

    Swift

    func dataForString(_ string: String, originatingFrom message: AWSDDLogMessage?) -> Data