Latest 0.1.1
Homepage https://github.com/pikachu987/ConsoleLog
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Version
License
Platform
Swift 4.0

Introduce

You can easily create and view logs.

demo

Requirements

ConsoleLog written in Swift 4. Compatible with iOS 8.0+

Installation

Cocoapods

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

pod 'ConsoleLog'

Usage

Code editor

import ConsoleLog
ConsoleLog.shared.show()

done!

write

ConsoleLog.shared.custom(level: ConsoleLog.Level, message: Any)
ConsoleLog.shared.verbose(_ message: Any)
ConsoleLog.shared.debug(_ message: Any)
ConsoleLog.shared.info(_ message: Any)
ConsoleLog.shared.warning(_ message: Any)
ConsoleLog.shared.error(_ message: Any)

remove

ConsoleLog.shared.remove()

show & hide

ConsoleLog.shared.show()
ConsoleLog.shared.hide()

get

// [ConsoleVO]
ConsoleLog.shared.readArray
// String
ConsoleLog.shared.read
// [ConsoleVO]
ConsoleLog.shared.todayReadArray
// String
ConsoleLog.shared.todayRead

Customize

ConsoleLog.consoleOptions

// MARK: LevelString
public struct LevelString {
    var verbose = "💜 VERBOSE"
    var debug = "💚 DEBUG"
    var info = "💙 INFO"
    var warning = "💛 WARNING"
    var error = "❤️ ERROR"
    var verboseColor = UIColor(red: 173/255, green: 58/255, blue: 243/255, alpha: 1)
    var debugColor = UIColor(red: 64/255, green: 198/255, blue: 41/255, alpha: 1)
    var infoColor = UIColor(red: 9/255, green: 99/255, blue: 246/255, alpha: 1)
    var warningColor = UIColor(red: 252/255, green: 210/255, blue: 62/255, alpha: 1)
    var errorColor = UIColor(red: 255/255, green: 55/255, blue: 43/255, alpha: 1)
}

// MARK: NavigationOptions
public struct NavigationOptions {
    var barColor = UIColor(white: 230/255, alpha: 1)
    var barTintColor = UIColor.black
}

// MARK: WebViewOptions
public struct WebViewOptions {
    var backgroundColor = UIColor.black
    var textColor = UIColor(red: 192/255, green: 192/255, blue: 186/255, alpha: 1)
    var fontSize: CGFloat = 10
}

// MARK: InfoOptions
public struct InfoOptions {
    var isLanguage = true
    var isPreferredLanguages = true
    var isLocale = true
    var isVersion = true
    var isBulid = true
    var isUUID = true
    var addText = ""
}

// MARK: ConsoleLogTitle
public struct ConsoleLogTitle {
    var todayLog = "Today Log"
    var log = "All Log"
    var info = "Info"
}

// MARK: ConsoleOptions
public struct ConsoleOptions {
    var levelString = LevelString()
    var naviagationOptions = NavigationOptions()
    var webViewOptions = WebViewOptions()
    var consoleLogTitle = ConsoleLogTitle()
    var infoOptions = InfoOptions()
    var dateFormat = "yyyy-MM-dd HH:mm:ss"
    var line = "------------------------------------------------------------"
    var ascending = false
}

Author

pikachu987, [email protected]

License

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

Latest podspec

{
    "name": "ConsoleLog",
    "version": "0.1.1",
    "summary": "You can create and view your app log.",
    "description": "You can easily view your app logs while your app is running.nYou can print the app log and create app logs.nYou can see crash critics.",
    "homepage": "https://github.com/pikachu987/ConsoleLog",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "pikachu987": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pikachu987/ConsoleLog.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.0",
    "source_files": "ConsoleLog/Classes/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This