diff --git a/Source/AppleLogger/Constant/LoggerConstant.swift b/Source/AppleLogger/Constant/LoggerConstant.swift index 037a269..813fb18 100644 --- a/Source/AppleLogger/Constant/LoggerConstant.swift +++ b/Source/AppleLogger/Constant/LoggerConstant.swift @@ -8,7 +8,7 @@ import Foundation struct LoggerConstant { - private static let paginateSize = 900 + static let paginateSize = 900 static let paginatedLog = { (message: String) in stride(from: 0, to: message.count, by: paginateSize).map { point in diff --git a/Source/AppleLogger/Implement/LogService.swift b/Source/AppleLogger/Implement/LogService.swift index 3c05ecd..5bc2504 100644 --- a/Source/AppleLogger/Implement/LogService.swift +++ b/Source/AppleLogger/Implement/LogService.swift @@ -18,7 +18,7 @@ extension LogService { _ message: String, _ printBlock: (String) -> Void ) { - if setting.isPaginateLogEnabled { + if setting.isPaginateLogEnabled, message.count > LoggerConstant.paginateSize { let logs = LoggerConstant.paginatedLog(message) let id = arc4random() % 1000000000