CocoaPods trunk is moving to be read-only. Read more on the blog, there are 9 months to go.

KokteylLog 1.1.4

KokteylLog 1.1.4

Maintained by Tolga Seremet, Mehmet Karagoz.



  • By
  • Kokteyl

Swift Platforms CocoaPods Compatible SPM Compatible

KokteylLog

A lightweight logging SDK for iOS.

Requirements

  • iOS 9.0+
  • Xcode 12+

Installation

Swift Package Manager

Add the following to your Package.swift dependencies:

.package(url: "https://github.com/kokteyldev/KOKTEYL-LOG-SDK.git", from: "1.1.1")

Then add KokteylLog to your target dependencies:

.product(name: "KokteylLog", package: "KokteylLog")

Or in Xcode: File → Add Package Dependencies and enter the repository URL.

CocoaPods

Add the following to your Podfile:

pod 'KokteylLog'

Then run:

pod install

Usage

Set Log Level

KKLogSetLoglevel(KKLogLevelError);

Available log levels:

Level Description
KKLogLevelSilent No logs
KKLogLevelError Errors only
KKLogLevelWarning Errors and warnings
KKLogLevelInfo Errors, warnings, and info
KKLogLevelAll Everything

Set Log Prefix

KKLogSetLogPrefix(@"<MySDK> ");

Logging

KKLogError(@"Something went wrong: %@", errorMessage);
KKLogWarning(@"Unexpected value: %@", value);
KKLogInfo(@"Initialized successfully");
KKLogMessage(@"Custom message");

Get Current Log Level

KKLogLevel currentLevel = KKLogGetLogLevel();

License

Copyright 2016 KOKTEYL Bilgi Teknolojisi Hizmetleri A.S. All rights reserved.

Contact