diff --git a/README.md b/README.md index 0d6adec..ff2b33a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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("") // Specify the directory path of log file(s) @@ -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("", ""); +``` + +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`. diff --git a/README_ZH.md b/README_ZH.md index 582e83f..cf887f7 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -12,7 +12,7 @@ 依赖 ```groovy -implementation 'com.elvishew:xlog:1.7.1' +implementation 'com.elvishew:xlog:1.7.2' ``` 初始化 diff --git a/gradle.properties b/gradle.properties index 689beb5..f7a86d1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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