Subversion Repositories Mobile Apps.GyroMouse

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #import <Foundation/Foundation.h>
  2. #import "DDLog.h"
  3.  
  4. /**
  5.  * Welcome to Cocoa Lumberjack!
  6.  *
  7.  * The project page has a wealth of documentation if you have any questions.
  8.  * https://github.com/CocoaLumberjack/CocoaLumberjack
  9.  *
  10.  * If you're new to the project you may wish to read the "Getting Started" page.
  11.  * https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
  12.  *
  13.  *
  14.  * This class provides a log formatter that filters log statements from a logging context not on the whitelist.
  15.  *
  16.  * A log formatter can be added to any logger to format and/or filter its output.
  17.  * You can learn more about log formatters here:
  18.  * https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters
  19.  *
  20.  * You can learn more about logging context's here:
  21.  * https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomContext
  22.  *
  23.  * But here's a quick overview / refresher:
  24.  *
  25.  * Every log statement has a logging context.
  26.  * These come from the underlying logging macros defined in DDLog.h.
  27.  * The default logging context is zero.
  28.  * You can define multiple logging context's for use in your application.
  29.  * For example, logically separate parts of your app each have a different logging context.
  30.  * Also 3rd party frameworks that make use of Lumberjack generally use their own dedicated logging context.
  31. **/
  32. @interface DDContextWhitelistFilterLogFormatter : NSObject <DDLogFormatter>
  33.  
  34. - (id)init;
  35.  
  36. - (void)addToWhitelist:(int)loggingContext;
  37. - (void)removeFromWhitelist:(int)loggingContext;
  38.  
  39. - (NSArray *)whitelist;
  40.  
  41. - (BOOL)isOnWhitelist:(int)loggingContext;
  42.  
  43. @end
  44.  
  45. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  46. #pragma mark -
  47. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  48.  
  49. /**
  50.  * This class provides a log formatter that filters log statements from a logging context on the blacklist.
  51. **/
  52. @interface DDContextBlacklistFilterLogFormatter : NSObject <DDLogFormatter>
  53.  
  54. - (id)init;
  55.  
  56. - (void)addToBlacklist:(int)loggingContext;
  57. - (void)removeFromBlacklist:(int)loggingContext;
  58.  
  59. - (NSArray *)blacklist;
  60.  
  61. - (BOOL)isOnBlacklist:(int)loggingContext;
  62.  
  63. @end
  64.