Skip to content

Commit

Permalink
Release v1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
elvishew committed Nov 28, 2020
1 parent 07b5609 commit b287316
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Lightweight and pretty, powerful and flexible logger for android and java, can p
Dependency

```groovy
implementation 'com.elvishew:xlog:1.7.1'
implementation 'com.elvishew:xlog:1.7.2'
```

Initialization
Expand Down Expand Up @@ -111,7 +111,7 @@ LogConfiguration config = new LogConfiguration.Builder()
.addInterceptor(new MyInterceptor()) // Add other log interceptor
.build();

Printer androidPrinter = new AndroidPrinter(); // Printer that print the log using android.util.Log
Printer androidPrinter = new AndroidPrinter(true); // Printer that print the log using android.util.Log
Printer consolePrinter = new ConsolePrinter(); // Printer that print the log to console using System.out
Printer filePrinter = new FilePrinter // Printer that print(save) the log to file
.Builder("<path-to-logs-dir>") // Specify the directory path of log file(s)
Expand Down Expand Up @@ -346,6 +346,18 @@ Typically, you can use a `FileLastModifiedCleanStrategy`, which will delete log

By default, `NeverCleanStrategy` is used, which will never do any cleaning.

### Compress log files

Just call

```java
LogUtil.compress("<path-to-logs-dir>", "<path-to-zip-file>");
```

a zip file will be created and the entire log folder will be compressed and written to it, so you can easily collect the user logs for issue-debug.

Note: the origianl log files will not be deleted.

## Intercept and filter log

Before each log being printed, you have a chance to modify or filter out the log, by using an `Interceptor`.
Expand Down
2 changes: 1 addition & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
依赖

```groovy
implementation 'com.elvishew:xlog:1.7.1'
implementation 'com.elvishew:xlog:1.7.2'
```

初始化
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
VERSION_NAME=1.7.1
VERSION_CODE=14
VERSION_NAME=1.7.2
VERSION_CODE=15
GROUP=com.elvishew

POM_DESCRIPTION=Android logger, simple and pretty, powerful and flexible, all you need is here
Expand Down

0 comments on commit b287316

Please sign in to comment.