DDASLLogger.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Software License Agreement (BSD License)
  2. //
  3. // Copyright (c) 2010-2018, Deusty, LLC
  4. // All rights reserved.
  5. //
  6. // Redistribution and use of this software in source and binary forms,
  7. // with or without modification, are permitted provided that the following conditions are met:
  8. //
  9. // * Redistributions of source code must retain the above copyright notice,
  10. // this list of conditions and the following disclaimer.
  11. //
  12. // * Neither the name of Deusty nor the names of its contributors may be used
  13. // to endorse or promote products derived from this software without specific
  14. // prior written permission of Deusty, LLC.
  15. #import <Foundation/Foundation.h>
  16. // Disable legacy macros
  17. #ifndef DD_LEGACY_MACROS
  18. #define DD_LEGACY_MACROS 0
  19. #endif
  20. #import "DDLog.h"
  21. // Custom key set on messages sent to ASL
  22. extern const char* const kDDASLKeyDDLog;
  23. // Value set for kDDASLKeyDDLog
  24. extern const char* const kDDASLDDLogValue;
  25. /**
  26. * This class provides a logger for the Apple System Log facility.
  27. *
  28. * As described in the "Getting Started" page,
  29. * the traditional NSLog() function directs its output to two places:
  30. *
  31. * - Apple System Log
  32. * - StdErr (if stderr is a TTY) so log statements show up in Xcode console
  33. *
  34. * To duplicate NSLog() functionality you can simply add this logger and a tty logger.
  35. * However, if you instead choose to use file logging (for faster performance),
  36. * you may choose to use a file logger and a tty logger.
  37. **/
  38. API_DEPRECATED("Use DDOSLogger instead", macosx(10.4,10.12), ios(2.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0))
  39. @interface DDASLLogger : DDAbstractLogger <DDLogger>
  40. /**
  41. * Singleton method
  42. *
  43. * @return the shared instance
  44. */
  45. @property (class, readonly, strong) DDASLLogger *sharedInstance;
  46. // Inherited from DDAbstractLogger
  47. // - (id <DDLogFormatter>)logFormatter;
  48. // - (void)setLogFormatter:(id <DDLogFormatter>)formatter;
  49. @end