BadgeLog - A light lib that helps and centralize logs in your application

Overview

BadgeLog

CI Status Version License Platform

BadgeLog is an iOS Swift library that helps you manage logs within your application:

  • Centralize all log management logic
  • Print console logs in a nice way
  • Ability to save logs to file and export them

Configure

Setting up the library is very quick and easy. You need to invoke the following method:

Logger.shared.setup()

I recommend to put it within the initialization of the App or in any case as soon as possible

@main
struct BadgeLog_ExampleApp: App {
    
    init() {
        Logger.shared.setup()
    }
    
    var body: some Scene {
        WindowGroup {
            NavigationView{
                ContentView()
            }
        }
    }
}

The library is ready to log in! to log in, simply call up:

Logger.shared.verbose("I'm a verbose log!")
Logger.shared.debug("I'm a debug log!")
Logger.shared.info("I'm a info log!")
Logger.shared.warning("I'm a warning log!")
Logger.shared.error("I'm an error log!")
Logger.shared.error("I'm an error log!", error: NSError(domain: "", code: 999, userInfo: [NSLocalizedDescriptionKey: "Fake Exception"]))

The detailed documentation is still in progress.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • Compiled with swift 5
  • Deployment target 15.0

Installation

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

pod 'BadgeLog'

External libraries

Author

Badge87, [email protected]

License

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

You might also like...
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.

Please star this github repository to stay up to date. TraceLog Introduction TraceLog is a highly configurable, flexible, portable, and simple to use

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. A lightweight Swift logger, uses `print` in development and `NSLog` in production. Support colourful and formatted output.
A lightweight Swift logger, uses `print` in development and `NSLog` in production. Support colourful and formatted output.

Loggerithm A lightweight Swift logger, uses print in Debug and NSLog in Production with colourful output. Why In Swift, we usually use print to log in

Elegant and extensive logging facility for OS X & iOS (includes database, Telnet and HTTP servers)

Overview XLFacility, which stands for Extensive Logging Facility, is an elegant and powerful logging facility for OS X & iOS. It was written from scra

Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux in Swift.
Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux in Swift.

Lighty Easy to use and lightweight logger for iOS, macOS, tvOS, watchOS and Linux in Swift. Screenshots Requirements Lighty Version Minimum iOS Target

CleanroomLogger provides an extensible Swift-based logging API that is simple, lightweight and performant
CleanroomLogger provides an extensible Swift-based logging API that is simple, lightweight and performant

CleanroomLogger CleanroomLogger provides an extensible Swift-based logging API that is simple, lightweight and performant. The API provided by Cleanro

A simple Swift package for measuring and reporting the time taken for operations

Duration A simple Swift package for measuring and reporting the time taken for operations. It is derived from a version for Playgrounds that I blogged

A fancy logger yet lightweight, and configurable. 🖨
A fancy logger yet lightweight, and configurable. 🖨

📣 📣 Important: Printer can only print console logs if you're running an app in the Simulator. If you're running in a real device it will not print a

In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.
In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.

The debugger tool for iOS developer. Display logs, network request, device informations, crash logs while using the app. Easy accessible with its bubble head button 🔘 . Easy to integrate in any apps, to handle development or testing apps easier. First version, there is plenty of room for improvement.

Comments
  • Add custom Log Destinations

    Add custom Log Destinations

    Feature to add during setup the possibility of add any logDestination as you desire (Console, logfile ecc) with custom format (Just like the kotlin version).

    enhancement 
    opened by Badge87 0
Releases(0.2)
  • 0.2(Feb 8, 2022)

    What's Changed

    • Added documentation for exposed API by @Badge87 in https://github.com/Badge87/BadgeLog/pull/2
    • Custom Destination Functionality by @Badge87 in https://github.com/Badge87/BadgeLog/pull/4

    New Contributors

    • @Badge87 made their first contribution in https://github.com/Badge87/BadgeLog/pull/2

    Full Changelog: https://github.com/Badge87/BadgeLog/compare/0.1.0...0.2

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Feb 2, 2022)

Owner
Daniele
Writing code, playing games, eating food
Daniele
Styling and coloring your XCTest logs on Xcode Console

XLTestLog Notes with Xcode 8 and XLTestLog Since Xcode 8 killed XcodeColors, the current way using XCTestLog on Xcode 8 is just plain texts with emoji

Xaree Lee 58 Feb 2, 2022
Simply, Logify provides instant colorful logs to improve log tracking and bug tracing

Logify Simply, Logify provides instant colorful logs to improve log tracking and bug tracing. Why I need to use Logify? As discussed before in a lot o

Furkan KAPLAN 13 Dec 28, 2022
XCLog is a Swift extension that helps you print something in console when debugging your projects.

XCLog XCLog is a Swift extension that helps you print something in console when debugging your projects. Installation Open Xcode > File > Add Packages

null 1 Jan 9, 2022
Shows your current framerate (fps) in the status bar of your iOS app

WatchdogInspector Shows your current framerate (fps) in the status bar of your iOS app Be a good citizen! Don't block your main thread! WatchdogInspec

Christian Menschel 510 Nov 24, 2022
📱💬🚦 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.

TinyConsole TinyConsole is a tiny log console to display information while using your iOS app and written in Swift. Usage Wrap your Main ViewControlle

Devran Cosmo Uenal 2k Jan 3, 2023
DotsTest - Create a little Record application and using Pinata for API

Technical Test Create a little Record application and using Pinata for API. The

budain 0 Dec 31, 2021
SecFit (Secure Fitness) is a hybrid mobile application for fitness logging.

SecFit SecFit (Secure Fitness) is a hybrid mobile application for fitness logging. Deploy with Docker Prerequisites: Docker Git Windows hosts must use

Erik Turøy Midtun 0 Oct 22, 2021
Customizable Console UI overlay with debug log on top of your iOS App

AEConsole Customizable Console UI overlay with debug log on top of your iOS App AEConsole is built on top of AELog, so you should probably see that fi

Marko Tadić 142 Dec 21, 2022
Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.

Example mail composer Example Report Diagnostics is a library written in Swift which makes it really easy to share Diagnostics Reports to your support

WeTransfer 768 Dec 22, 2022
A simple logger for your swift applications.

AHQSLogger A simple logging system. Usage import AHQSLogger Use the following methods for loggging. Logging an information / debug You can log a simp

André Henrique da Silva 0 Dec 29, 2021