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

Unified Diff: lib/src/handlers/logger.dart

Issue 837193005: pkg/shelf: formatted code (Closed) Base URL: https://github.com/dart-lang/shelf.git@master
Patch Set: nits Created 5 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 | « lib/src/cascade.dart ('k') | lib/src/hijack_exception.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/handlers/logger.dart
diff --git a/lib/src/handlers/logger.dart b/lib/src/handlers/logger.dart
index e949c9bc29c22a461feb834f778e9c61f8f3f71e..f0833d701b66ca4e04e5d0b9d2bf8fffc835631e 100644
--- a/lib/src/handlers/logger.dart
+++ b/lib/src/handlers/logger.dart
@@ -50,24 +50,21 @@ Middleware logRequests({void logger(String msg, bool isError)}) =>
};
};
-String _getMessage(DateTime requestTime, int statusCode, Uri url,
- String method, Duration elapsedTime) {
-
+String _getMessage(DateTime requestTime, int statusCode, Uri url, String method,
+ Duration elapsedTime) {
return '${requestTime}\t$elapsedTime\t$method\t[${statusCode}]\t${url}';
}
-String _getErrorMessage(DateTime requestTime, Uri url,
- String method, Duration elapsedTime, Object error, StackTrace stack) {
-
+String _getErrorMessage(DateTime requestTime, Uri url, String method,
+ Duration elapsedTime, Object error, StackTrace stack) {
var chain = new Chain.current();
if (stack != null) {
chain = new Chain.forTrace(stack)
- .foldFrames((frame) => frame.isCore || frame.package == 'shelf')
- .terse;
+ .foldFrames((frame) => frame.isCore || frame.package == 'shelf').terse;
}
var msg = '${requestTime}\t$elapsedTime\t$method\t${url}\n$error';
- if(chain == null) return msg;
+ if (chain == null) return msg;
return '$msg\n$chain';
}
« no previous file with comments | « lib/src/cascade.dart ('k') | lib/src/hijack_exception.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698