AWSDDLogMessage

Objective-C

@interface AWSDDLogMessage : NSObject <NSCopying> {
  NSString *_message;
  AWSDDLogLevel _level;
  AWSDDLogFlag _flag;
  NSInteger _context;
  NSString *_file;
  NSString *_fileName;
  NSString *_function;
  NSUInteger _line;
  id _tag;
  AWSDDLogMessageOptions _options;
  NSDate *_timestamp;
  NSString *_threadID;
  NSString *_threadName;
  NSString *_queueLabel;
}

Swift

class AWSDDLogMessage : NSObject, NSCopying

The AWSDDLogMessage class encapsulates information about the log message. If you write custom loggers or formatters, you will be dealing with objects of this class.

  • Undocumented

    Declaration

    Objective-C

    NSString *_message
  • Undocumented

    Declaration

    Objective-C

    AWSDDLogLevel _level
  • Undocumented

    Declaration

    Objective-C

    AWSDDLogFlag _flag
  • Undocumented

    Declaration

    Objective-C

    NSInteger _context
  • Undocumented

    Declaration

    Objective-C

    NSString *_file
  • Undocumented

    Declaration

    Objective-C

    NSString *_fileName
  • Undocumented

    Declaration

    Objective-C

    NSString *_function
  • Undocumented

    Declaration

    Objective-C

    NSUInteger _line
  • Undocumented

    Declaration

    Objective-C

    id _tag
  • Undocumented

    Declaration

    Objective-C

    AWSDDLogMessageOptions _options
  • Undocumented

    Declaration

    Objective-C

    NSDate *_timestamp
  • Undocumented

    Declaration

    Objective-C

    NSString *_threadID
  • Undocumented

    Declaration

    Objective-C

    NSString *_threadName
  • Undocumented

    Declaration

    Objective-C

    NSString *_queueLabel
  • Default init for empty messages.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    init()
  • Standard init method for a log message object. Used by the logging primitives. (And the macros use the logging primitives.)

    If you find need to manually create logMessage objects, there is one thing you should be aware of:

    If no flags are passed, the method expects the file and function parameters to be string literals. That is, it expects the given strings to exist for the duration of the object’s lifetime, and it expects the given strings to be immutable. In other words, it does not copy these strings, it simply points to them. This is due to the fact that FILE and FUNCTION are usually used to specify these parameters, so it makes sense to optimize and skip the unnecessary allocations. However, if you need them to be copied you may use the options parameter to specify this.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithMessage:(nonnull NSString *)message
                                      level:(AWSDDLogLevel)level
                                       flag:(AWSDDLogFlag)flag
                                    context:(NSInteger)context
                                       file:(nonnull NSString *)file
                                   function:(NSString *_Nullable)function
                                       line:(NSUInteger)line
                                        tag:(id _Nullable)tag
                                    options:(AWSDDLogMessageOptions)options
                                  timestamp:(NSDate *_Nullable)timestamp;

    Swift

    init(message: String, level: AWSDDLogLevel, flag: AWSDDLogFlag, context: Int, file: String, function: String?, line: UInt, tag: Any?, options: AWSDDLogMessageOptions = [], timestamp: Date?)

    Parameters

    message

    the message

    level

    the log level

    flag

    the log flag

    context

    the context (if any is defined)

    file

    the current file

    function

    the current function

    line

    the current code line

    tag

    potential tag

    options

    a bitmask which supports AWSDDLogMessageCopyFile and AWSDDLogMessageCopyFunction.

    timestamp

    the log timestamp

    Return Value

    a new instance of a log message model object

  • The log message

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull message;

    Swift

    var message: String { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) AWSDDLogLevel level

    Swift

    var level: AWSDDLogLevel { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) AWSDDLogFlag flag

    Swift

    var flag: AWSDDLogFlag { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger context

    Swift

    var context: Int { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *file

    Swift

    var file: String { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *fileName

    Swift

    var fileName: String { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString * __nullable function

    Swift

    var function: String? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSUInteger line

    Swift

    var line: UInt { get }
  • tag

    Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) id __nullable tag

    Swift

    var tag: Any? { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) AWSDDLogMessageOptions options

    Swift

    var options: AWSDDLogMessageOptions { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDate *timestamp

    Swift

    var timestamp: Date { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *threadID

    Swift

    var threadID: String { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *threadName

    Swift

    var threadName: String { get }
  • Undocumented

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *queueLabel

    Swift

    var queueLabel: String { get }