GDASLLog Class Reference

The GDASLLog is a wrapper around Apple's system log facility (man asl). More...

#import <GDASLLog.h>

List of all members.

Public Member Functions

(id) - initWithSender:facility:connectImmediately:
 Designated initializer - inits with required parameters.
(int) - setLogFile:
 Set's a log file to write all logs to.
(void) - alert:
 Alert message.
(void) - critical:
 Critical message.
(void) - debug:
 Debug message.
(void) - emergency:
 Emergency message.
(void) - error:
 Error message.
(void) - info:
 Info message.
(void) - notice:
 Notice message.
(void) - warning:
 Warning message.
(void) - close
 Close this log.

Protected Attributes

int fd
 File descriptor for log file.
aslclient client
 Apple Sys Log client.

Properties

Boolean logToStdOut
 Whether or not to log all messages to stdout as well.

Detailed Description

The GDASLLog is a wrapper around Apple's system log facility (man asl).


Member Function Documentation

- (void) close  

Close this log.

If you call close directly this log won't work anymore - it's called when this object is deallocated.

- (id) initWithSender: (NSString *)  sender
facility: (NSString *)  facility
connectImmediately: (Boolean)  connectImmediately 

Designated initializer - inits with required parameters.

Here's an extracted example:

 GDASLLog * log = [[GDASLLog alloc] initWithSender:@"MyAppName" facility:@"my.company.AppName" connectImmediately:TRUE];
 [log setLogFile:@"/var/log/MyApp"];
 [log info:@"TEST"];
- (int) setLogFile: (NSString *)  filePath  

Set's a log file to write all logs to.

If a log file isn't set the logs aren't stored, they're still visible in the console.


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