FMDBLogger.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #import <Foundation/Foundation.h>
  2. #import <CocoaLumberjack/DDAbstractDatabaseLogger.h>
  3. @class FMDatabase;
  4. @interface FMDBLogger : DDAbstractDatabaseLogger <DDLogger>
  5. {
  6. @private
  7. NSString *logDirectory;
  8. NSMutableArray *pendingLogEntries;
  9. FMDatabase *database;
  10. }
  11. /**
  12. * Initializes an instance set to save it's sqlite file to the given directory.
  13. * If the directory doesn't already exist, it is automatically created.
  14. **/
  15. - (id)initWithLogDirectory:(NSString *)logDirectory;
  16. //
  17. // This class inherits from DDAbstractDatabaseLogger.
  18. //
  19. // So there are a bunch of options such as:
  20. //
  21. // @property (assign, readwrite) NSUInteger saveThreshold;
  22. // @property (assign, readwrite) NSTimeInterval saveInterval;
  23. //
  24. // @property (assign, readwrite) NSTimeInterval maxAge;
  25. // @property (assign, readwrite) NSTimeInterval deleteInterval;
  26. // @property (assign, readwrite) BOOL deleteOnEverySave;
  27. //
  28. // And methods such as:
  29. //
  30. // - (void)savePendingLogEntries;
  31. // - (void)deleteOldLogEntries;
  32. //
  33. // These options and methods are documented extensively in DDAbstractDatabaseLogger.h
  34. //
  35. @end