WWPrint

main

The number of lines that can be printed + the printing method of the method name => convenient for debugging.
William-Weng/WWPrint

WWPrint

Swift-5.6 iOS-14.0 TAG Swift Package Manager-SUCCESS LICENSE

  • The number of lines that can be printed + the printing method of the method name => convenient for debugging
  • 可以印出行數 + 方法名稱的Print方法 / WWLogger => 方便Debug

dependencies: [
    .package(url: "https://github.com/William-Weng/WWPrint.git", .upToNextMajor(from: "1.2.0"))
]

Function - 可用函式

函式 功能
wwPrint(_:file:method:line:isShow:) 可以印出行數 + 方法名稱的Print方法 => 方便Debug
build(subsystem:category:) 建立WWLogger
build(bundle:category:) 建立WWLogger
message(_:level:) 主控台輸出
wwMessage(_:file:method:line:) 可以印出行數的Debug字串
wwFatalError(_:file:line:) 強制讓App自殺閃退
wwAssert(_:message:file:line:) 有條件讓App自殺閃退 for Debug模式
wwAssertionFailure(_:file:line:) 檢查後已經確定要強制App閃退 for Debug模式
wwPrecondition(_:message:file:line:) 有條件讓App自殺閃退
wwPreconditionFailure(_:file:line:) 檢查後已經確定要強制App閃退

Example

import UIKit
import WWPrint

final class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        let message = wwMessage("iOS好棒棒")
        let logger = WWLogger.build()
        
        print(message)
        wwPrint("Hello World!!!")
        
        logger?.message("debug", level: .debug)
        logger?.message("info", level: .info)
        logger?.message("notice", level: .notice)
        logger?.message("warning", level: .warning)
        logger?.message("critical", level: .critical)
    }
}

Description

  • Swift Tools 5.6.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Oct 18 2024 16:31:38 GMT-0900 (Hawaii-Aleutian Daylight Time)