i have bunch of ddlogerror
statements in app. starting test app friends , family. whenever 1 of these test apps hits error, want able logs automatically.
brute force way add below each ddlogerror
statement, keeps track of fact app hit error , periodically upload logs such users in background.
now have 100s of these statements scattered on code, prefer change ddlogerror
globally not prints give in format string updates property says app hit error condition.
whats best way this? subclass cocoalumberjack class , override ddlogerror
method?
i solved problem using customformatter described in https://github.com/cocoalumberjack/cocoalumberjack/blob/master/documentation/customformatters.md
basically, associated filelogger custom formatter. in custom formatter, whenever ddlogerror called, steps keeping track error occurred , logs needs uploaded when on wifi , in background, adding custom string make filtering easy etc.
Comments
Post a Comment