You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README it says that setting maximumFileSize to 0 should disable the file size limit, meaning a single file can grow without restriction. But in practice, what happens is that the logger starts creating a flood of files, each only a few bytes long — as if the max file size were literally being treated as 0 bytes. What I actually want is to ignore file size entirely and just rely on daily rolling, so that I get one log file per day.
Also on Android, setTotalSizeCap is assigned as an int, which means its maximum value is 2^31 - 1 (≈2.1 GB). Any value above this overflows into a negative number. When that happens, Logback’s rolling policy breaks and no log files are produced.
This calculates maximumNumberOfFiles * maximumFileSize as ~12 GB, which doesn’t fit in an int. The overflowed negative value passed to setTotalSizeCap prevents log files from being created
Activity
alois-beto commentedon Jan 14, 2026
Thanks for reporting this bug. What I’m seeing is that
maximumFileSize = 0is not compatible with daily rolling: in the Android implementation :react-native-file-logger/android/src/main/java/com/betomorrow/rnfilelogger/FileLoggerModule.java
Lines 90 to 122 in 1ba13d0
when
dailyRollingis enabled,maximumFileSizeis effectively interpreted as 0 bytes, which leads to the flood of tiny files.So I think for now you should avoid using
dailyRolling: truewithmaximumFileSize: 0.