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

Side by Side Diff: mojo/services/flog/cpp/flog.cc

Issue 2008553006: Add 'Flog' formatted logging to mojo/services (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « mojo/services/flog/cpp/flog.h ('k') | mojo/services/flog/interfaces/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/services/flog/cpp/flog.h"
6
7 namespace mojo {
8 namespace flog {
9
10 // static
11 std::atomic_ulong Flog::last_allocated_channel_id_;
12
13 // static
14 FlogLoggerPtr Flog::logger_;
15
16 FlogChannel::FlogChannel(const char* channel_type_name)
17 : id_(Flog::AllocateChannelId()) {
18 Flog::LogChannelCreation(id_, channel_type_name);
19 }
20
21 FlogChannel::~FlogChannel() {
22 Flog::LogChannelDeletion(id_);
23 }
24
25 bool FlogChannel::Accept(Message* message) {
26 Flog::LogChannelMessage(id_, message);
27 return true;
28 }
29
30 bool FlogChannel::AcceptWithResponder(Message* message,
31 MessageReceiver* responder) {
32 MOJO_DCHECK(false) << "Flog doesn't support messages with responses";
33 abort();
34 }
35
36 } // namespace flog
37 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/flog/cpp/flog.h ('k') | mojo/services/flog/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698