Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
Fix: Correctly log an exception when no stack trace is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
luizmineo committed Aug 28, 2014
1 parent 2d3ae5e commit a69a1bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.5.15
* Fix: Correctly log an exception when no stack trace is provided

## v0.5.14
* Fix: `Manager.findMethods()` should include inherited methods.

Expand Down
4 changes: 2 additions & 2 deletions lib/src/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ void setupConsoleLog([Level level = Level.INFO]) {
Logger.root.level = level;
Logger.root.onRecord.listen((LogRecord rec) {
if (rec.level >= Level.SEVERE) {
var stack = rec.stackTrace != null ? rec.stackTrace : "";
print('${rec.level.name}: ${rec.time}: ${rec.message} - ${rec.error}\n${Trace.format(stack)}');
var stack = rec.stackTrace != null ? "\n${Trace.format(rec.stackTrace)}" : "";
print('${rec.level.name}: ${rec.time}: ${rec.message} - ${rec.error}${stack}');
} else {
print('${rec.level.name}: ${rec.time}: ${rec.message}');
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: redstone
version: 0.5.14
version: 0.5.15
author: Luiz Mineo <[email protected]>
description: A metadata driven microframework for Dart
homepage: http://redstonedart.org
Expand Down

0 comments on commit a69a1bc

Please sign in to comment.