Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: #10

Open
ecionini opened this issue Sep 30, 2024 · 0 comments
Open

[Bug]: #10

ecionini opened this issue Sep 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ecionini
Copy link

ecionini commented Sep 30, 2024

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…"

@ecionini ecionini added the bug Something isn't working label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant