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

Unified Diff: pkg/analysis_server/lib/src/analysis_logger.dart

Issue 136333008: Logging support for server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add copyright Created 6 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/LICENSE ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_logger.dart
diff --git a/pkg/analysis_server/lib/src/analysis_logger.dart b/pkg/analysis_server/lib/src/analysis_logger.dart
new file mode 100644
index 0000000000000000000000000000000000000000..69630655e4c1b1238c3c1faec5e8e22be367e992
--- /dev/null
+++ b/pkg/analysis_server/lib/src/analysis_logger.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analysis.logger;
+
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:logging/logging.dart' as logging;
+
+/**
+ * Instances of the class [AnalysisLogger] translate from the analysis engine's
+ * API to the logging package's API.
+ */
+class AnalysisLogger implements Logger {
+ /**
+ * The underlying logger that is being wrapped.
+ */
+ final logging.Logger baseLogger = new logging.Logger('analysis.server');
+
+ @override
+ void logError(String message) {
+ baseLogger.severe(message);
+ }
+
+ @override
+ void logError2(String message, Exception exception) {
+ baseLogger.severe(message, exception);
+ }
+
+ @override
+ void logError3(Exception exception) {
+ baseLogger.severe("Exception", exception);
+ }
+
+ @override
+ void logInformation(String message) {
+ baseLogger.info(message);
+ }
+
+ @override
+ void logInformation2(String message, Exception exception) {
+ baseLogger.info(message, exception);
+ }
+}
« no previous file with comments | « pkg/analysis_server/LICENSE ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698