Skip to content

Commit

Permalink
Revert "log rotation to have txt file"
Browse files Browse the repository at this point in the history
This reverts commit c34356e.
  • Loading branch information
LePips committed Jan 24, 2022
1 parent c34356e commit 1f17426
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Sources/Puppy/FileRotationLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ public class FileRotationLogger: FileLogger {
let oldArchivedFileURLs = ascArchivedFileURLs(fileURL)
for (index, oldArchivedFileURL) in oldArchivedFileURLs.enumerated() {
let generationNumber = oldArchivedFileURLs.count + 1 - index
let rotatedFileURL = oldArchivedFileURL
.deletingPathExtension()
.appendingPathExtension("\(generationNumber)")
.appendingPathComponent(".txt")
let rotatedFileURL = oldArchivedFileURL.deletingPathExtension().appendingPathExtension("\(generationNumber)")
debug("generationNumber: \(generationNumber), rotatedFileURL: \(rotatedFileURL)")
if !FileManager.default.fileExists(atPath: rotatedFileURL.path) {
try FileManager.default.moveItem(at: oldArchivedFileURL, to: rotatedFileURL)
Expand Down

0 comments on commit 1f17426

Please sign in to comment.