IOS Streaming Browser 1.0
An IOS streaming browser to stream the display to others or to a projector

DDLogMessage Class Reference

#import <DDLog.h>

Public Member Functions

(id) - initWithLogMsg:level:flag:context:file:function:line:
(NSString *) - threadID
(NSString *) - fileName
(NSString *) - methodName

Data Fields

int logLevel
int logFlag
int logContext
NSString * logMsg
NSDate * timestamp
const char * file
const char * function
int lineNumber
mach_port_t machThreadID

Detailed Description

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

Definition at line 523 of file DDLog.h.


Member Function Documentation

- (NSString *) fileName

Convenience method to get just the file name, as the file variable is generally the full file path. This method does not include the file extension, which is generally unwanted for logging purposes. returns NSString

- (id) initWithLogMsg: (NSString *)  msg
level: (int)  level
flag: (int)  flag
context: (int)  context
file: (const char *)  aFile
function: (const char *)  aFunction
line: (int)  line 

The initializer is somewhat reserved for internal use. However, if you find need to manually create logMessage objects, there is one thing you should be aware of. The initializer 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.

Initialize the DDLogMessage param NSString param int param int param int param const char param const char param int returns id

Definition at line 1218 of file DDLog.m.

                    :(NSString *)msg
               level:(int)level
                flag:(int)flag
             context:(int)context
                file:(const char *)aFile
            function:(const char *)aFunction
                line:(int)line
{
        if((self = [super init]))
        {
                logMsg     = [msg retain];
                logLevel   = level;
                logFlag    = flag;
                logContext = context;
                file       = aFile;
                function   = aFunction;
                lineNumber = line;
                
                timestamp = [[NSDate alloc] init];
                
                machThreadID = pthread_mach_thread_np(pthread_self());
        }
        return self;
}
- (NSString *) methodName

Returns the function variable in NSString form. returns NSString

- (NSString *) threadID

Returns the threadID as it appears in NSLog. That is, it is a hexadecimal value which is calculated from the machThreadID. returns NSSTring


Field Documentation

- (const char*) file

Definition at line 559 of file DDLog.h.

- (const char*) function

Definition at line 564 of file DDLog.h.

- (int) lineNumber

Definition at line 569 of file DDLog.h.

- (int) logContext

Definition at line 544 of file DDLog.h.

- (int) logFlag

Definition at line 539 of file DDLog.h.

- (int) logLevel

Definition at line 534 of file DDLog.h.

- (NSString*) logMsg

Definition at line 549 of file DDLog.h.

- (mach_port_t) machThreadID

Definition at line 574 of file DDLog.h.

- (NSDate*) timestamp

Definition at line 554 of file DDLog.h.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Defines