CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

LogSheet 1.0.1

LogSheet 1.0.1

Maintained by Abhishek.



LogSheet 1.0.1

LogSheet

CI Status Version License Platform

Features

This is my agenda for this repository,

  • Maintain a CSV File which maintain your logs
  • Export CSV File using UIActivityViewController
  • UI ListView which shows all logs with a detail view.
  • Filter Button where, you can filter logs on LogType.
  • Update/Delete Option

Installation

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

pod 'LogSheet'

Usage

  1. Initialize
import LogSheet

Then, you need a LogSheet object for futher actions,

let logSheet = LogSheet.instance
  1. Create Log

At any point, you want to create a log then call write(_:) method which expects LogModel() Object.

// Structure Your Log Model
let model = LogModel(identifer: 123, name: "New Error ", description: "This is my Error. I should write a detailed explanation", tags: [.buisnessError], type: .verbose, createTimestamp: Date(), updateTimestamp: Date())

// Call Write method to persist
if logSheet.write(log: model) {
    print("Successfully Written")
}
else {
    print("Failed while writing")
}
  1. Read Log

There is a read method which expect LogID if you want to get that particlaur log. Else, You have to pass nil in the parameter.

// All Logs
if let data = logSheet.read(nil) {
print("Logs Count: \(data.cout)")
}

// Any Particular Log
if let data = logSheet.read(123) {
    print(data.description)
}

Author

Abhishek Kumar Ravi, [email protected]

License

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