HKdebug, a logger with colors

In one of my last project for iOS (swift) I use SwiftyBeaver for debug with colors, it is very nice. It is an amazing tool for debugin, you can choosen the output of log (Xcode console or file). have many options and more important it is easy to use.

After this project, I had to make some changes in a couple old projects (Objective-C). at some point in these changes i was debug a response of request, so a send the response to NSLog, but don’t have colors!!! aahhh, so i search for a quick integration of SwiftyBeaver to my project, I found a wrapper for SwiftyBeaver (SBObjectiveCWrapper), sweet, after the read the instructions I realized that a need to change my AppDelagate to swift version and add SwiftyBeaver and SBObjectiveCWrapper (6 Files), a need a the bridge file and add “@import SBObjectiveCWrapper;” in all files where i need to debug. Yep, I only want a log with color, some quick and easy.

For that reason I decided to make this little class (functions and macros) in order to have the same output. It does not have the full functionality of SwiftyBeaver. I only want a basic log with colors for debug and the result was this:

HKDebug, you can choose for full color in the line, if you want time/file/function/line element in the output.

I want to add the the functionality for send the log to a file. I hope to add soon

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.