Aspen icon indicating copy to clipboard operation
Aspen copied to clipboard

Streamline log() and outputToLog()

Open drance opened this issue 10 years ago • 0 comments

The ObjC AspenHelpers currently log without the handy emoji prefixes. This is because that formatting is done in the private outputToLog() function, which ObjC can't call. Rather than make outputToLog() public so ObjC can see it, suggest (review with @justin):

  • remove outputToLog(), and rewrite verbose(), info(), etc. to call LogFormatter directly. This saves a method call and autoclosure capture / alloc per log statement, and isolates the implicit nature of the formatter to the convenience methods
  • remove the unused logger param from LogFormatter.formatLog()

drance avatar Oct 16 '15 05:10 drance