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; | |
6 | |
7 import 'package:analysis_server/src/analysis_server.dart'; | 5 import 'package:analysis_server/src/analysis_server.dart'; |
8 import 'package:analyzer/exception/exception.dart'; | 6 import 'package:analyzer/exception/exception.dart'; |
9 import 'package:analyzer/src/generated/engine.dart'; | 7 import 'package:analyzer/src/generated/engine.dart'; |
10 import 'package:logging/logging.dart' as logging; | 8 import 'package:logging/logging.dart' as logging; |
11 | 9 |
12 /** | 10 /** |
13 * Instances of the class [AnalysisLogger] translate from the analysis engine's | 11 * Instances of the class [AnalysisLogger] translate from the analysis engine's |
14 * API to the logging package's API. | 12 * API to the logging package's API. |
15 */ | 13 */ |
16 class AnalysisLogger implements Logger { | 14 class AnalysisLogger implements Logger { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 46 |
49 @override | 47 @override |
50 void logInformation(String message, [CaughtException exception]) { | 48 void logInformation(String message, [CaughtException exception]) { |
51 if (exception == null) { | 49 if (exception == null) { |
52 baseLogger.info(message); | 50 baseLogger.info(message); |
53 } else { | 51 } else { |
54 baseLogger.info(message, exception.exception, exception.stackTrace); | 52 baseLogger.info(message, exception.exception, exception.stackTrace); |
55 } | 53 } |
56 } | 54 } |
57 } | 55 } |
OLD | NEW |