Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kharauzov/purelogger
Light logger 🧐 to use during the development in the Xcode project.
https://github.com/kharauzov/purelogger
debug ios log logger logging osx xcode
Last synced: 1 day ago
JSON representation
Light logger 🧐 to use during the development in the Xcode project.
- Host: GitHub
- URL: https://github.com/kharauzov/purelogger
- Owner: Kharauzov
- License: mit
- Created: 2019-07-08T07:33:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-01T11:57:31.000Z (over 4 years ago)
- Last Synced: 2025-01-01T10:41:13.160Z (9 days ago)
- Topics: debug, ios, log, logger, logging, osx, xcode
- Language: Swift
- Homepage:
- Size: 135 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)
![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS-lightgrey)
[![License](https://img.shields.io/badge/license-mit-blue.svg)](https://doge.mit-license.org)## Overview
PureLogger is an elegant replacement of ```Swift.print()``` in the Xcode project to use during the debugging.
## Presentation
## Installation
### CocoaPods
```ruby
pod 'PureLogger'
```### Manually
Just copy **Source** folder to your Xcode project.
## How To
**Method #1 - Globally**
After adding the framework to your project, you need to import the module in your AppDelegate class.
```swift
import PureLogger
```
Then add this line just below
```swift
let log = Log.shared
```
After this you can access ```log``` istance across all project.
```swift
log.debug("Testing debug log")
```**Method #2 - Locally**
After adding the framework to your project, you need to import the module in the every class, you wish to use the logger.
```swift
import PureLogger
```
Then you need to initialise the local logger like this
```swift
let log = Log()
```
After this you can access ```log``` istance in the appropriate class.**Available methods**
```swift
log.debug(...)
log.info(...)
log.warning(...)
log.error(...)
```Also you can use such logic, if you want to print only input item itself without any additional information.
```swift
Log("Simple log")
```Besides this, you can customize emoji, date format and other things at the output information to fit your demands 😉
## Feedback
If you have any questions or suggestions, feel free to open issue just at this project.## License
PureLogger and all its classes are available under the MIT license. See the LICENSE file for more info.