Treessence icon indicating copy to clipboard operation
Treessence copied to clipboard

Wrong file name when `withFileLimit` is 1

Open OKatrych opened this issue 2 years ago • 0 comments

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,

OKatrych avatar Oct 20 '22 16:10 OKatrych