-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Relevant Gradle config:
implementation 'com.github.bright:slf4android:0.1.5'
I am trying to log to a file, and in my activity I have this:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FileLogHandlerConfiguration fileHandler = LoggerConfiguration.fileLogHandler(this);
fileHandler.setFullFilePathPattern(new File(getApplicationInfo().dataDir, "activity.g.%u" +".log").getAbsolutePath());
LoggerConfiguration.configuration().addHandlerToRootLogger(fileHandler);
}
And each time I enter the activity (without exiting the app, just going to another activity in it) it creates a new file. After entering two time to the activity I have
activity.0.0.log
activity.0.1.log
Is this expected behavior? Can I configure it to have only one (rotated) file?
Metadata
Metadata
Assignees
Labels
No labels