At the beginning of func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool configure logr service with wanted targets:
This repository is under the Apache v2.0 license. Find it here.
Copyright 2021 Paulius Gudonis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Logr
Simple logging library for iOS written in Swift
Features
Integration
Swift Package Manager
Once Swift package set up, add the following to your
Package.swift
:Usage
In your
AppDelegate.swift
file add:At the beginning of
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
configure logr service with wanted targets:For more serious configuration in production, it is recommended to ommit
ConsoleTarget
. For example:The set targets will be used across the whole application.
To log messages, simply create
Logr
instance in class initializer and start logging. For example:Demo
Demo project can be access by opening Demo.workspace in Demo sub-folder.
Documentation
Author
Licence
This repository is under the Apache v2.0 license. Find it here.