【Swift】Debug時のみ、ログ出力を行うprint,dump
Debug時のみ、ログ出力を行うprint,dump
static func dump<T>(_ value: T, name: String? = nil, indent: Int = 0, maxDepth: Int = Int.max, maxItems: Int = Int.max) {
#if DEBUG
Swift.dump(value, name: name, indent: indent, maxDepth: maxDepth, maxItems: maxItems)
#endif
}
static func print(_ items: Any...) {
#if DEBUG
Swift.print(items)
#endif
}
Build Settings > Other Swift Flags に 「-D DEBUG」を忘れずに!
Author And Source
この問題について(【Swift】Debug時のみ、ログ出力を行うprint,dump), 我々は、より多くの情報をここで見つけました https://qiita.com/tetsukick/items/1d7044dc60cce47a4f26著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .