Treessence
Treessence copied to clipboard
Wrong file name when `withFileLimit` is 1
When using this setup:
FileLoggerTree.Builder()
.withFileName("logFileName")
.withDir(androidContext().cacheDir)
.withMinPriority(Log.VERBOSE)
.withFileLimit(1)
.build()
the fileLoggerTree.files
will always return an empty list. This happens because fileLoggerTree.getFileName(X)
returns the file name appended with ".X" number, but the real file name is without ".X".
For example, with the setup from the above, the library will create a file with the name "logFileName", but the getFileName(0)
function will return the "logFileName.0" value, which is incorrect,