/ConsoleLogFile

Primary LanguageSwiftMIT LicenseMIT

ConsoleLogFile

Introduce

You can easily create a log file from the print statement in the project without changing print or anything else.

demo

Installation

Simply add the following line to your Podfile:

pod 'ConsoleLogFile'

Usage

import ConsoleLogFile
ConsoleLogFile.shared.createLog()

Share

ConsoleLogFile.shared.shareFile(viewController: self)

Customize

  • fileName: change log file name (default value is 'Console')
  • maxFileSizeInMB: if file size reach to max then it will be deleted (default value 5 MB)
  • shouldOverrideOldFile: if true then every time ConsoleLogFile.shared.createLog() execute it will override
ConsoleLogFile.shared.createLog(fileName: "Debug", maxFileSizeInMB: 10, shouldOverrideOldFile: true)

TODO

  • Use REST API to enable/disable log file creation

Author

Jignesh, jigs.patelit@gmail.com

License

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