Skip to content

Too many files #17

@GasparPizarro

Description

@GasparPizarro

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions