Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

AppLog

Printing Logs in File and present in viewController.

Usage

AppLog.print("Hey error occured")

Output:

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
⏰ Date: 2019-11-30 10:10:10 +0000
---------------------------------
📄FileName: ~/AppName/AppDelegate.swift
---------------------------------
🔨Function: fetchResource(_:)
---------------------------------
♦️LineNumber: 78
---------------------------------
👨🏻‍💻 Message: Hey error Occured
---------------------------------
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

With extra information

func addItem(request:ItemRequest, completion:@escaping(Result<AppResponse<Int>,ResponseError>)->Void){
apiProvider.request(.addItem(request)){(result)inswitch result {case.success(let response):do{...try...}catch{completion(.failure(.canNotParse))AppLog.print(error, extraInfo: request))}case.failure(let error):...}}}

Present AppLogViewController

extensionAppViewController{func presentLogsVC(){AppLogViewController.present(using:self)}}

Installation:

Drag and Drop Folder to your project AppLog.

Or Individual Files:

  1. AppLogViewController.swift
  2. AppLog.swift
  3. FileHandleOutputStream.swift

About

Printing Logs in File and present in viewController.

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages