Using CustomFormatter on Console Output #66

Closed
pbian opened this Issue Oct 10, 2012 · 1 comment

Comments

Projects
None yet
2 participants

pbian commented Oct 10, 2012

I am trying to format my DDLog output to console through creating a custom formatter following this link https://github.com/robbiehanson/CocoaLumberjack/wiki/CustomFormatters. I am having trouble to figure out how to use this customized formatter so that in my other class the DDLogError() will provide the formatted output.

For now the Custom Formatter does not do anything to my console (Xcode debug console) output.

Member

bpoplauschi commented Nov 1, 2013

@pbian could you share the code where you do this? It should work if you set a custom formatter instance as formatter for your DDTTYLogger.

@interface CustomLogFormatter : DispatchQueueLogFormatter<DDLogFormatter>
...
CustomLogFormatter *ttyFormatter = [[CustomLogFormatter alloc] init];
[[DDTTYLogger sharedInstance] setLogFormatter:ttyFormatter];

@bpoplauschi bpoplauschi closed this Nov 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment