Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: pkg/analysis_server/lib/src/analysis_logger.dart

Issue 1480663002: Remove duplicated stack trace from error notifications (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analysis.logger; 5 library analysis.logger;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analyzer/src/generated/engine.dart'; 8 import 'package:analyzer/src/generated/engine.dart';
9 import 'package:analyzer/src/generated/java_engine.dart'; 9 import 'package:analyzer/src/generated/java_engine.dart';
10 import 'package:logging/logging.dart' as logging; 10 import 'package:logging/logging.dart' as logging;
(...skipping 25 matching lines...) Expand all
36 }); 36 });
37 } 37 }
38 38
39 @override 39 @override
40 void logError(String message, [CaughtException exception]) { 40 void logError(String message, [CaughtException exception]) {
41 if (exception == null) { 41 if (exception == null) {
42 baseLogger.severe(message); 42 baseLogger.severe(message);
43 } else { 43 } else {
44 baseLogger.severe(message, exception.exception, exception.stackTrace); 44 baseLogger.severe(message, exception.exception, exception.stackTrace);
45 } 45 }
46 server.sendServerErrorNotification( 46 server.sendServerErrorNotification(message, exception, null);
47 message, exception, exception?.stackTrace);
48 } 47 }
49 48
50 @override 49 @override
51 void logError2(String message, Object exception) { 50 void logError2(String message, Object exception) {
52 baseLogger.severe(message, exception); 51 baseLogger.severe(message, exception);
53 } 52 }
54 53
55 @override 54 @override
56 void logInformation(String message, [CaughtException exception]) { 55 void logInformation(String message, [CaughtException exception]) {
57 if (exception == null) { 56 if (exception == null) {
58 baseLogger.info(message); 57 baseLogger.info(message);
59 } else { 58 } else {
60 baseLogger.info(message, exception.exception, exception.stackTrace); 59 baseLogger.info(message, exception.exception, exception.stackTrace);
61 } 60 }
62 } 61 }
63 62
64 @override 63 @override
65 void logInformation2(String message, Object exception) { 64 void logInformation2(String message, Object exception) {
66 baseLogger.info(message, exception); 65 baseLogger.info(message, exception);
67 } 66 }
68 } 67 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698