Giter Club home page Giter Club logo

aardvark's Introduction

Aardvark

Aardvark is a library that makes it dead simple to create actionable bug reports.

Getting started

There are only three steps to get Aardvark logging and bug reporting up and running.

  1. Install with CocoaPods
platform :ios, '6.0'
pod 'Aardvark'

Or manually checkout the submodule with git submodule add [email protected]:Square/Aardvark.git, drag Aardvark.xcodeproj to your project, and add Aardvark as a build dependency.

  1. Call [Aardvark addDefaultBugReportingGestureWithEmailBugReporterWithRecipient:] to enable the creation of email bug reports. It is best to do this when you load your application’s UI.

  2. Replace calls to NSLog with ARKLog. ARKLog has exactly the same syntax as NSLog.

Reporting Bugs

After doing the above, your users can report a bug by making a two-finger long-press gesture. This gesture triggers a UIAlert asking the user what went wrong. When the user enters this information, an email bug report is generated complete with an attached app screenshot and a text file containing the last 2000 logs. Screenshots are created and stored within Aardvark and do not require camera roll access.

Bug Report Flow

Want to look at logs on device? Push an instance of ARKLogTableViewController onto the screen to view your logs.

Performance

Logs are distributed to loggers on an internal background queue that will never slow down your app. Logs observed by the log store are incrementally appended to disk and not stored in memory.

Customize Aardvark

Want to customize how bug reports are filed? Pass your own object conforming to the ARKBugReporter protocol and the desired subclass of UIGestureRecognizer to [Aardvark addBugReporter:triggeringGestureRecognizerClass:]. You can further customize how bug reports will be triggered by modifying the returned gesture recognizer.

Want to change how logs are formatted? Set your own logFormatter on the ARKEmailBugReporter returned from [Aardvark addDefaultBugReportingGestureWithEmailBugReporterWithRecipient:].

Want to log to the console? [ARKLogDistributor defaultDistributor].defaultLogStore.printsLogsToConsole = YES;.

Want different log files for different features? Create an ARKLogStore for each feature you want to have its own log file and add them to the default log distributor with [[[ARKLogDistributor](Logging/ARKLogDistributor.h) defaultDistributor] addLogObserver:featureLogStore]. Set the logFilterBlock on your ARKLogStore to make sure only the logs you want are observed by the ARKLogStore. Use ARKLogWithType’s userInfo dictionary to specify to which feature a log pertains. See SampleViewController’s tapGestureLogStore for an example.

Want to send your logs to third party services? One log can be easily distributed to multiple services by adding objects conforming to ARKLogObserver to the default ARKLogDistributor via addLogObserver:. SampleCrashlyticsLogObserver is an example of an ARKLogObserver that sends event logs to Crashlytics.

Want to log with Aardvark but don’t want to use Aardvark’s bug reporting tool? Skip step #2 in Getting Started and manually add ARKLogObserver to the default ARKLogDistributor.

Requirements

  • Xcode 5 or later
  • iOS 6 or later

Contributing

We’re glad you’re interested in Aardvark, and we’d love to see where you take it.

Any contributors to the master Aardvark repository must sign the Individual Contributor License Agreement (CLA). It’s a short form that covers our bases and makes sure you’re eligible to contribute.

When you have a change you’d like to see in the master repository, send a pull request. Before we merge your request, we’ll make sure you’re in the list of people who have signed a CLA.

Thanks, and happy logging!

aardvark's People

Contributors

brianpartridge avatar dfed avatar mikelikespie avatar pwesten avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.