![]() |
IOS Streaming Browser 1.0
An IOS streaming browser to stream the display to others or to a projector
|
#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 |
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.
- (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
- (int) lineNumber |
- (int) logContext |
- (mach_port_t) machThreadID |