FMDBLogger.h 1.1 KB

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