Inherits from NSObject
Conforms to NSCopying
Declared in DDLog.h

Tasks

Properties

context

@property (readonly, nonatomic) NSInteger context

file

@property (readonly, nonatomic) NSString *file

fileName

@property (readonly, nonatomic) NSString *fileName

flag

@property (readonly, nonatomic) DDLogFlag flag

function

@property (readonly, nonatomic) NSString *function

level

@property (readonly, nonatomic) DDLogLevel level

line

@property (readonly, nonatomic) NSUInteger line

message

@property (readonly, nonatomic) NSString *message
Discussion

Read-only properties

Declared In

DDLog.h

options

@property (readonly, nonatomic) DDLogMessageOptions options

queueLabel

@property (readonly, nonatomic) NSString *queueLabel

tag

@property (readonly, nonatomic) id tag

threadID

@property (readonly, nonatomic) NSString *threadID

threadName

@property (readonly, nonatomic) NSString *threadName

timestamp

@property (readonly, nonatomic) NSDate *timestamp

Instance Methods

initWithMessage:level:flag:context:file:function:line:tag:options:timestamp:

- (instancetype)initWithMessage:(NSString *)message level:(DDLogLevel)level flag:(DDLogFlag)flag context:(NSInteger)context file:(NSString *)file function:(NSString *)function line:(NSUInteger)line tag:(id)tag options:(DDLogMessageOptions)options timestamp:(NSDate *)timestamp
Discussion

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. Options is a bitmask which supports DDLogMessageCopyFile and DDLogMessageCopyFunction.

Declared In

DDLog.h