Skip to content

Commit

Permalink
[mixin_logger] bump version to 0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
boyan01 committed May 30, 2023
1 parent d0db642 commit b665d4f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/mixin_logger/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.0.6

* add `setLoggerFileLeading` api.

## 0.0.5

* support config new log file content leading.
Expand Down
10 changes: 10 additions & 0 deletions packages/mixin_logger/lib/mixin_logger.dart
Expand Up @@ -84,26 +84,35 @@ Future<void> initLogger(
await platform.initLogger(logDir, maxFileCount, maxFileLength, fileLeading);
}

/// Set the leading of log file content, it will be written
/// to the first line of each log file.
void setLoggerFileLeading(String? leading) {
platform.setLoggerFileLeading(leading);
}

/// verbose log
void v(String message) {
_print(message, _LogLevel.verbose);
}

/// debug log
void d(String message) {
_print(message, _LogLevel.debug);
}

/// info log
void i(String message) {
_print(message, _LogLevel.info);
}

/// warning log
void w(String message) {
_print(message, _LogLevel.warning);
}

/// error log
/// [error] the error object
/// [stackTrace] the stack trace of the error
void e(String message, [Object? error, StackTrace? stackTrace]) {
var messageWithStack = message;
if (error != null) {
Expand All @@ -115,6 +124,7 @@ void e(String message, [Object? error, StackTrace? stackTrace]) {
_print(messageWithStack, _LogLevel.error);
}

/// wtf log
void wtf(String message) {
_print(message, _LogLevel.wtf);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/mixin_logger/pubspec.yaml
@@ -1,10 +1,10 @@
name: mixin_logger
description: Simple logger tool for flutter.
version: 0.0.5
description: Simple logger tool for flutter, make it easy to save your app log to file.
version: 0.0.6
homepage: https://github.com/MixinNetwork/flutter-plugins

environment:
sdk: ">=2.14.0 <3.0.0"
sdk: ">=2.14.0 <4.0.0"
flutter: ">=1.17.0"

dependencies:
Expand Down

0 comments on commit b665d4f

Please sign in to comment.