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

Side by Side Diff: runtime/vm/log.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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 | « runtime/vm/log.h ('k') | runtime/vm/longjump.h » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 #include "vm/log.h" 5 #include "vm/log.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/thread.h" 8 #include "vm/thread.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 DEFINE_FLAG(bool, force_log_flush, false, "Always flush log messages."); 12 DEFINE_FLAG(bool, force_log_flush, false, "Always flush log messages.");
13 13
14 DEFINE_FLAG(charp, isolate_log_filter, NULL, 14 DEFINE_FLAG(charp,
15 isolate_log_filter,
16 NULL,
15 "Log isolates whose name include the filter. " 17 "Log isolates whose name include the filter. "
16 "Default: service isolate log messages are suppressed " 18 "Default: service isolate log messages are suppressed "
17 "(specify 'vm-service' to log them)."); 19 "(specify 'vm-service' to log them).");
18 20
19 Log::Log(LogPrinter printer) 21 Log::Log(LogPrinter printer)
20 : printer_(printer), 22 : printer_(printer), manual_flush_(0), buffer_(0) {}
21 manual_flush_(0),
22 buffer_(0) {
23 }
24 23
25 24
26 Log::~Log() { 25 Log::~Log() {
27 // Did someone enable manual flushing and then forgot to Flush? 26 // Did someone enable manual flushing and then forgot to Flush?
28 ASSERT(cursor() == 0); 27 ASSERT(cursor() == 0);
29 } 28 }
30 29
31 30
32 Log* Log::Current() { 31 Log* Log::Current() {
33 Thread* thread = Thread::Current(); 32 Thread* thread = Thread::Current();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 log_->EnableManualFlush(); 177 log_->EnableManualFlush();
179 } 178 }
180 179
181 180
182 LogBlock::~LogBlock() { 181 LogBlock::~LogBlock() {
183 log_->Flush(cursor_); 182 log_->Flush(cursor_);
184 log_->DisableManualFlush(); 183 log_->DisableManualFlush();
185 } 184 }
186 185
187 } // namespace dart 186 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/log.h ('k') | runtime/vm/longjump.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698