Skip to content

Commit

Permalink
fix: solve issue that logger always paginate log
Browse files Browse the repository at this point in the history
  • Loading branch information
0xWOF committed Jan 30, 2024
1 parent a120bfc commit e5284c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/AppleLogger/Constant/LoggerConstant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Source/AppleLogger/Implement/LogService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e5284c3

Please sign in to comment.