Skip to content

[Bug]:  #10

@ecionini

Description

@ecionini

Platform Version

15.8.3

SDK Version

17.2

Xcode Version

15.2

Steps To Reproduce

Configure rotate file transport:
let rotateFilesTransport = try SizeRotationFileTransport(directoryURL: FileHelper.getLogDirectory()) {
$0.maxFileSize = .kilobytes(500) // maximum size per file
$0.maxFilesCount = 4 // max number of logs
$0.filePrefix = "GG2Log_" // custom file name
$0.formatters = [JSONFormatter.standard()] // output format for events
}

Expected Behavior

I expect that when the log file reaches the maximum size set in configuration, the library will create a new file correctly.

Actual Incorrect Behavior

There is an error on line 147 in the file SizeRotationFileTransport:

let uuidString = UUID().uuidString.lowercased().trunc(.tail(length: 15))

The uuidstring is truncated incorrectly and returns with dots at the end (...). If you concatenate this string into a url, you get an incompatible url.
ES: "d13ab1e8-2fa5-4…"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions