Latest 1.0.1
License MIT
Platforms ios 8.0
Frameworks UIKit, Foundation

CI Status

Did you ever have a need to add logging of user actions to see how to reproduce that crash? This pod does just that.

UILogger.printToConsole = false

NotificationCenter.default.addObserver(forName: UILogger.uiLogNotification, object: nil, queue: nil) { (n) in
    guard let logItem = n.object as? UILogItem else { return }
    // do something here with logItem
    print("received log item: (UILoggerLaunchTimeHolder.appUptime()) (logItem.descriptionDict)")

At this point n.object is an instance of one of the subclasses of UILogItem. Each of the subclasses store action details in properties (please feel free to take a look at those), also each subclass implements this property, which contains all details as strings:

public lazy var descriptionDict: [String : String]

Action types

There’re these log action types: viewControllerDidAppear, controlAction, tableCellTap and collectionCellTap

Under the hood there’s swift code for the logic and obj-c code that swizzles UIApplication, UIViewController, UITableView and UICollectionView.
Please let me know if you have a better idea for implementing this then swizzling.

Cell title customization

There’s this protocol if you’d like to return title from custom table or collection view cell:

public protocol UILogTitleProvider {
    var uiLogTitle: String? { get }


To run the example project, clone the repo and open the workspace from the Example dir.



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

pod 'UILogger'


Dan Pashchenko


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

Latest podspec

    "name": "UILogger",
    "version": "1.0.1",
    "summary": "A logging framework for UI actions on iOS",
    "description": "A logging framework to log UI actions e.g. button taps, view controller appearances, table cell taps etc. Tags: log logs logging logger UI ui ui-log uilog",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Dan Pashchenko": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "platforms": {
        "ios": "8.0"
    "source_files": [
    "frameworks": [

Pin It on Pinterest

Share This