All Projects → abdullahselek → Lighty

abdullahselek / Lighty

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

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Lighty

l
Cross-platform html/io [L]ogger with simple API.
Stars: ✭ 26 (-46.94%)
Mutual labels:  logger, logging-library
ratlog.js
🐀 Ratlog JavaScript library - Application Logging for Rats, Humans and Machines
Stars: ✭ 24 (-51.02%)
Mutual labels:  logger, logging-library
sqlite micro logger arduino
Fast and Lean Sqlite database logger for Microcontrollers
Stars: ✭ 128 (+161.22%)
Mutual labels:  logger, logging-library
RxLogs
An Android & Kotlin Reactive Advanced Logging Framework.
Stars: ✭ 12 (-75.51%)
Mutual labels:  logger, logging-library
BLogger
An easy to use modern C++14/17 async cross-platform logger which supports custom formatting/patterns, colored output, Unicode, file logging, log rotation & more!
Stars: ✭ 23 (-53.06%)
Mutual labels:  logger, logging-library
clue
a extremely high performance log library for android. 高性能的Android日志库
Stars: ✭ 27 (-44.9%)
Mutual labels:  logger, logging-library
Simple-Log
dnkpp.github.io/Simple-Log/
Stars: ✭ 13 (-73.47%)
Mutual labels:  logger, logging-library
Timber Elixir
🌲 Great Elixir logging made easy
Stars: ✭ 226 (+361.22%)
Mutual labels:  logger, logging-library
Flogs
An Advanced Logging Framework develop in flutter that provides quick & simple logging solution.
Stars: ✭ 158 (+222.45%)
Mutual labels:  logger, logging-library
KmLogging
Kotlin multiplatform logging. High performance, composable and simple to use.
Stars: ✭ 21 (-57.14%)
Mutual labels:  logger, logging-library
JJSwiftLog
Swift log library for all platform
Stars: ✭ 51 (+4.08%)
Mutual labels:  logger, logging-library
chronica
Logger framework for Erlang applications
Stars: ✭ 57 (+16.33%)
Mutual labels:  logger, logging-library
LogDNA-Android-Client
Android client for LogDNA
Stars: ✭ 22 (-55.1%)
Mutual labels:  logger, logging-library
noodlog
🍜 Parametrized JSON logging library in Golang which lets you obfuscate sensitive data and marshal any kind of content.
Stars: ✭ 42 (-14.29%)
Mutual labels:  logger, logging-library
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.
Stars: ✭ 3,710 (+7471.43%)
Mutual labels:  carthage, logging-library
beautiful logger
Yet another logger API in Java with beautiful features
Stars: ✭ 60 (+22.45%)
Mutual labels:  logger, logging-library
Izumi
Productivity-oriented collection of lightweight fancy stuff for Scala toolchain
Stars: ✭ 423 (+763.27%)
Mutual labels:  logger, logging-library
Ring Log
Ring-Log是一个高效简洁的C++异步日志, 其特点是效率高(每秒支持至少125万+日志写入)、易拓展,尤其适用于频繁写日志的场景
Stars: ✭ 201 (+310.2%)
Mutual labels:  logger, logging-library
Loggaby
📝 A simple, lightweight and customizable logger.
Stars: ✭ 20 (-59.18%)
Mutual labels:  logger, logging-library
use-reducer-logger
A very basic logger for the useReducer function in the React Hooks API.
Stars: ✭ 89 (+81.63%)
Mutual labels:  logger, logging-library

Build Status CocoaPods Compatible Carthage Compatible Swift Package Manager Compatible Coverage Status Platform License

Lighty

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

Screenshots

default_theme dark_theme

Requirements

Lighty Version Minimum iOS Target Minimum OS X Target Minimum watchOS Target Minimum tvOS Target Swift Version
1.1.7 iOS 10 OS X 10.11 watchOS 3.0 tvOS 10.0 Swift 5
1.1.6 iOS 9 OS X 10.9 watchOS 2.0 tvOS 9.0 Swift 4.1
1.1.5 iOS 9 OS X 10.9 watchOS 2.0 tvOS 9.0 Swift 4.0
1.1.4 iOS 9 OS X 10.9 watchOS 2.0 tvOS 9.0 Swift 3.x

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Lighty into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
	pod 'Lighty', '~>1.1.7'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

brew update
brew install carthage

To integrate Lighty into your Xcode project using Carthage, specify it in your Cartfile:

github "abdullahselek/Lighty" ~> 1.1.7

Run carthage update to build the framework and drag the built Lighty.framework into your Xcode project.

Swift Package Manager

Modify your Package.swift file to include the following dependency:

.package(url: "https://github.com/abdullahselek/Lighty.git", from: "1.1.7")

Run swift package resolve

Example Usage

import Lighty
let logger = LightyLogger.sharedInstance

logger.log(type: .verbose, message: "Verbose")
logger.log(type: .debug, message: "Debug")
logger.log(type: .info, message: "Info")
logger.log(type: .warn, message: "Warn")

LightyLogger.sharedInstance.log(type: .error, message: "Error for test :)")

or globally add an instance to AppDelegate

import Lighty

let logger = LightyLogger.sharedInstance

class AppDelegate: UIResponder, UIApplicationDelegate {
    ...
}

and you can reach logger instance from module classes.

You can set your own date formatter and separator

let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .long
dateFormatter.timeStyle = .long
logger.dateFormatter = dateFormatter
logger.separator = " + "

Enable/Disable formatted date logs

logger.enableDate = false

Enable/Disable logging

logger.enable = false

Logs for just debug mode

logger.dlog(type: .warn, message: "Log for just debug mode")
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].