DSLogs 0.2.0

DSLogs 0.2.0

LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Mar 2020

Maintained by Danny Sung.

DSLogs 0.2.0

  • By
  • Danny Sung


CI Status Version License Platform


DSLogs provides a very simple set of macros that wrap around NSLog().

When releasing apps to the App Store, it's usually good to disable NSLog(). These macros provide a simple way to manage this.


Code Console Output
DLog(@"Message"); FILE:LineNum Message
WLog(@"Message"); FILE:LineNum WARNING: Message
ELog(@"Message"); FILE:LineNum ERROR: Message

When ENABLE_LOGS is not specified, DLog() resolves to a no-op.



DSLogs is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DSLogs"

To enable DLog(), you will need to add some compile-time settings. Go to your project build settings.

For Objective-C, under Custom Compiler Flags, add the following to Other C Flags: Debug: -DENABLE_LOGS=1 Release: -DENABLE_LOGS=0

For Swift, under Custom Flags, add the following to your Active Compilation Conditoins: Debug: ENABLE_LOGS

Note that for swift

For Objective-C, you should add the following to a common header file:

#import <DSLogs.h>

For Swift, you will need to add the following where you expect to use DSLogs:

import DSLogs


Danny Sung, [email protected]


DSLogs is available under the MIT license. See the LICENSE file for more info.

Bitdeli Badge