bosphere / Android-FileLogger

A general-purpose logging library with built-in support to save logs to file efficiently.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make the Usage instrcutions better, currently only in README.md

enlighter opened this issue · comments

FL.init(new FLConfig.Builder(this)
                .logger()          // customise how to hook up with logcat
                .defaultTag()      // customise default tag
                .logToFile(true)   // enable logging to file
                .dir()             // customise directory to hold log files
                .formatter()       // customise log format and file name
                .retentionPolicy() // customise retention strategy
                .maxFileCount()    // customise how many log files to keep if retention by file count
                .maxTotalSize()    // customise how much space log files can occupy if retention by total size
                .build());

is not how one can actually use it, as the logger(), defaultTag() etc. methods require a parameter to be passed, they cannot be run without passing any parameters.

So you should make the instructions clearer and a more detailed. Maybe provide a sample app code.

thanks for the feedback, will improve it. but i do provide a sample app already under app module, feel free to check it out for more detailed usage. in fact the source code is pretty straightforward, so i didn't bother adding too much documentation. but yeah, you definitely make a good point here. thanks for that.