OkLog alternatives and similar libraries
Based on the "Logging" category.
Alternatively, view OkLog alternatives based on common mentions on social networks and blogs.
-
CocoaLumberjack
A fast & simple, yet powerful & flexible logging framework for macOS, iOS, tvOS and watchOS -
XCGLogger
A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number. -
GodEye
Automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code based on Swift. Just like God opened his eyes -
TinyConsole
๐ฑ๐ฌ๐ฆ TinyConsole is a micro-console that can help you log and display information inside an iOS application, where having a connection to a development computer is not possible. -
CleanroomLogger
CleanroomLogger provides an extensible Swift-based logging API that is simple, lightweight and performant -
KZLinkedConsole
Clickable links in your Xcode console, so you never wonder which class logged the message. -
Diagnostics
Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs. -
JustLog
DISCONTINUED. JustLog brings logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support for logz.io available. -
LxDBAnything
Automate box any value! Print log without any format control symbol! Change debug habit thoroughly! -
Twitter Logging Service
Twitter Logging Service is a robust and performant logging framework for iOS clients -
XLFacility
DISCONTINUED. Elegant and extensive logging facility for OS X & iOS (includes database, Telnet and HTTP servers) -
Loggerithm
DISCONTINUED. A lightweight Swift logger, uses print in development and NSLog in production. Support colourful and formatted output. -
puree
DISCONTINUED. [Obsoleted] A log collector for iOS (new version! -> https://github.com/cookpad/Puree-Swift) -
Atlantis
A powerful input-agnostic swift logging framework made to speed up development with maximum readability. -
Logkit
An efficient logging library for OS X, iOS, watchOS, and tvOS โ written in Swift. Log to console, file, HTTP service, or your own endpoint. Simple to get started, but smartly customizable. -
CleanroomASL
DISCONTINUED. A Swift-based API for reading from & writing to the Apple System Log (more commonly known somewhat inaccurately as "the console") -
TraceLog
TraceLog is a highly configurable, flexible, portable, and simple to use debug logging system for Swift and Objective-C applications running on Linux, macOS, iOS, watchOS, and tvOS. -
ReflectedStringConvertible
A protocol that allows any class to be printed as if it were a struct or a JSON object. -
Spy
Spy is a flexible, lightweight, multiplatform logging utility written in pure Swift. It allows to log with different levels and on different channels. You can define what levels and channels actually are.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of OkLog or a related project?
README
OkLog for iOS and macOS
OkLog-Swift is a network logger written in Swift highly inspired by simonpercic's original OkLog implementation to be used in iOS and macOS projects.
What does it do?
OkLog encodes request & response data and generates an URL from where you can see all those info nicely, making it easy to debug and share network data. Here's an example.
Installation
CocoaPods
OkLog is integrated with CocoaPods. To use it in your project, add to your Podfile
:
pod 'OkLog'
or
pod 'OkLog/Alamofire'
and then don't forget to run:
$ pod install
Swift Package Manager
OkLog is also available through SPM.
Usage
URLSession
In the URLSession
's result closure simply call
OkLog.log(request: request, response: response, data: data)
to get the URL printed in Xcode's console, or
let url = OkLog.getUrl(request: request, response: response, data: data)
to retrieve it and do whatever you want.
Alamofire
If you are using Alamofire, place
OkLog.log(response)
or
let url = OkLog.getUrl(response)
in the request's completion closure.
You can also opt-out from URL shortening by specifying shortenUrl: false
as parameter.
An example project is included with a few sample requests using URLSession and Alamofire.