Skip to content
/ Output Public

Output is a simple print statement wrapper to make your application's logging more descriptive and easier to understand.

Notifications You must be signed in to change notification settings

chackle/Output

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📢 Output

Travis CI Swift Package Manager iOS, Mac & Linux

Output is a simple print statement wrapper to make your application's logging more descriptive and easier to understand.

📝 Simple logging with descriptive syntax

Output uses Swift's strong type system to make it obvious what your print statements are meant to be displaying both in your code and in your program's output:

log(.success("Successfully downloaded image!"))

=>

✅ Successfully downloaded image!

Smart Result type logging

Output also provides helpers to make logging work the way it should do. We often deal with Result types when we're dealing with asynchronous actions such as web requests. Passing a Result type to Output's log function will bridge the outcome to either .success or .failure resulting in a more descriptive output:

let result: Result<Any, LocalizedNetworkError> = .failure(NetworkError.forbidden)
log(result)

=>

❌ Error 403: Forbidden - Your LocalizedNetworkError description

About

Output is a simple print statement wrapper to make your application's logging more descriptive and easier to understand.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages