TestFormatter.m 530 B

12345678910111213141516171819202122
  1. //
  2. // TestFormatter.m
  3. // CustomFormatters
  4. //
  5. // CocoaLumberjack Demos
  6. //
  7. #import "TestFormatter.h"
  8. /**
  9. * For more information about creating custom formatters, see the wiki article:
  10. * https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters
  11. **/
  12. @implementation TestFormatter
  13. - (NSString *)formatLogMessage:(DDLogMessage *)logMessage
  14. {
  15. return [NSString stringWithFormat:@"%@ | %@ @ %@ | %@",
  16. [logMessage fileName], logMessage->_function, @(logMessage->_line), logMessage->_message];
  17. }
  18. @end