HDSLog 1.0.0

HDSLog 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jul 2015

Maintained by Georgiy Malyukov.



HDSLog 1.0.0

Simple iOS managed logging library in Objective-C.

HDSLog uses standard NSLog() macro so you should NOT redefine this macro by yourself.

Adding HDSLog to your project

Source files

Alternatively you can directly add the HDSLog.h and HDSLog.m source files to your project.

  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.
  2. Open your project in Xcode, then drag and drop HDSLog.h and HDSLog.m onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
  3. Include HDSLog wherever you need it with #import "HDSLog.h".

Usage

All your code can be separated on the virtual groups, for example, network requests, UI animation cases, etc. HDSLog helps you to log these parts independently with the single HDSLog management code.

[[HDSLog instance] setToken:@"NETWORK_REQUESTS" enabled:YES];

// now use log function with your token whenever you want
[HDSLog logToken:@"NETWORK_REQUESTS" format:@"My network request is: %@", yourNetworkRequestInstance];

Note that you can enable or disable multiple tokens at any moment.

Recommendations

For convenient usage it's recommended to store your tokens as a constants in some separated header file.

License

MIT. See LICENSE for details.