OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |