File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change
1
+ ## [ 3.3.0] - 2021-11-29
2
+ * Added option to manage the log level. Doesn't print failed downloads by default anymore. You can set it like this:
3
+ ``` dart
4
+ CacheManager.logLevel = CacheManagerLogLevel.verbose;
5
+ ```
6
+
1
7
## [ 3.2.0] - 2021-11-27
2
8
* [ Bugfix] getSingleFile now downloads a new file before completing as the outdated file might have been deleted.
3
9
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ void main() {
12
12
pubDevURL: 'https://pub.dev/packages/flutter_cache_manager' ,
13
13
pages: [CacheManagerPage .createPage ()],
14
14
));
15
+ CacheManager .logLevel = CacheManagerLogLevel .verbose;
15
16
}
16
17
17
18
const url = 'https://blurha.sh/assets/images/img1.jpg' ;
Original file line number Diff line number Diff line change 1
1
import '../flutter_cache_manager.dart' ;
2
2
3
+ /// Instance of the cache manager. Can be set to a custom one if preferred.
3
4
CacheLogger cacheLogger = CacheLogger ();
4
5
6
+ /// Log levels of the cache manager. Debug shows failed downloads and verbose
7
+ /// also shows successful downloads and cache retrievals.
5
8
enum CacheManagerLogLevel {
6
9
none,
7
10
warning,
8
11
debug,
9
12
verbose,
10
13
}
11
14
15
+ /// [CacheLogger] which is used by the cache manager to log useful information
12
16
class CacheLogger {
17
+ /// Function to log a message on a certain loglevel
13
18
void log (String message, CacheManagerLogLevel level) {
14
19
if (CacheManager .logLevel.index >= level.index) {
15
20
print (message);
Original file line number Diff line number Diff line change 1
1
name : flutter_cache_manager
2
2
description : Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
3
- version : 3.2 .0
3
+ version : 3.3 .0
4
4
homepage : https://github.com/Baseflow/flutter_cache_manager/tree/master/flutter_cache_manager
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments