add exception details to linter logging info

Change-Id: Idf2f8c35def6a94e0e5febac53e1109e1983d061
Reviewed-on: https://dart-review.googlesource.com/c/88287
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
diff --git a/pkg/analyzer/lib/src/lint/analysis.dart b/pkg/analyzer/lib/src/lint/analysis.dart
index be9fa8e..65fde36 100644
--- a/pkg/analyzer/lib/src/lint/analysis.dart
+++ b/pkg/analyzer/lib/src/lint/analysis.dart
@@ -254,7 +254,18 @@
 /// [errorSink].
 class StdLogger extends Logger {
   @override
-  void logError(String message, [exception]) => errorSink.writeln(message);
+  void logError(String message, [exception]) {
+    errorSink.writeln(message);
+    if (exception != null) {
+      errorSink.writeln(exception);
+    }
+  }
+
   @override
-  void logInformation(String message, [exception]) => outSink.writeln(message);
+  void logInformation(String message, [exception]) {
+    outSink.writeln(message);
+    if (exception != null) {
+      outSink.writeln(exception);
+    }
+  }
 }