Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
/ FCLogger Public archive

CocoaLumberjack logs in your UITextView with colours

License

Notifications You must be signed in to change notification settings

federicocappelli/FCLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#FCLogger FCLogger is a DDAbstractLogger implementation that allow all the CocoaLumberjack logs to be displayed inside the app, supports custom colors (Like XCodeColors).

Screenshots:

Screenshot 1

##Install ###Cocoapod Add the pod to your podfile

pod 'FCLogger'

###Manual Import the files in your project

FCLogger.h
FCLogger.m

How to use:

Have a look to the FCLoggerSample app provided.

Steps

  • Setup Cocoalumberjack as usual
  • Import FCLogger
	 #import <FCLogger/FCLogger.h>
  • Create your own UITextView in any part of your app
  • Create and configure the logger:
// create the FC logger
self.fcLogger = [[FCLogger alloc] init];
    
//assign a standard UITextView
self.fcLogger.textView = self.textView;

//enable auto scroll
self.fcLogger.autoScrollsToBottom = YES;
    
//enable colors support
self.fcLogger.colorsEnabled = YES;
    
//add logger to CocoaLumberjack
[DDLog addLogger:self.fcLogger];
    
//set custom color for specific log flag
[self.fcLogger setLogColor:[UIColor blueColor] forFlag:DDLogFlagDebug];
  • Use Cocoalumberjack as usual
DDLogDebug(@"Test debug log");
DDLogError(@"Test error log");

About

CocoaLumberjack logs in your UITextView with colours

Resources

License

Stars

Watchers

Forks

Packages

No packages published