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

Side by Side Diff: mojo/services/log/interfaces/entry.mojom

Issue 1447273002: Mojo Log service and a thread-safe client library. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: oops: restore vtl's TODO, fix LogClient::GetLogger() Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 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 module mojo.log;
6
7 // Log levels: Levels less than |kLogLevelVerbose| are valid and indicate
8 // greater levels of verbosity. Levels greater than |kLogLevelFatal| are
9 // invalid and should be taken to be equivalent to |kLogLevelFatal|.
10
11 const int32 kLogLevelVerbose = -1;
12 const int32 kLogLevelInfo = 0;
13 const int32 kLogLevelWarning = 1;
14 const int32 kLogLevelError = 2;
15 const int32 kLogLevelFatal = 3;
16
17 // TODO(vardhan): Should we split this into ClientEntry and ServiceEntry?
18 // EntryMetadata is only meant to be used by a log service.
19 struct Entry {
20 // Client-supplied information:
21 // Client-side timestamp.
22 int64 timestamp;
23 // Log level: one of |kLogLevel...|.
24 int32 log_level;
25
26 // The client source location this log originated from.
27 string? source_file;
28 uint32 source_line = 0;
29
30 // Message.
31 string? message;
32
33 // Service-supplied information, not set by the client.
34 EntryMetadata? metadata;
35 };
36
37 struct EntryMetadata {
38 int64 server_timestamp;
39 string source;
40 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698