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

Unified 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: removed environment & bindings changes from previous patchset. remove unused mojo::log::EntryMetad… 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/log/interfaces/entry.mojom
diff --git a/mojo/services/log/interfaces/entry.mojom b/mojo/services/log/interfaces/entry.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..0d78726455142a2dd949529cb6e1735469506991
--- /dev/null
+++ b/mojo/services/log/interfaces/entry.mojom
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module mojo.log;
+
+// Log levels: Levels less than |kLogLevelVerbose| are valid and indicate
+// greater levels of verbosity. Levels greater than |kLogLevelFatal| are
+// invalid and should be taken to be equivalent to |kLogLevelFatal|.
viettrungluu 2015/11/20 23:21:51 Then they're not invalid, are they? Just say that
vardhan 2015/12/02 00:06:13 Done.
+
viettrungluu 2015/11/20 23:21:51 nit: no blank line here
vardhan 2015/12/02 00:06:13 Done.
+const int32 kLogLevelVerbose = -1;
+const int32 kLogLevelInfo = 0;
+const int32 kLogLevelWarning = 1;
+const int32 kLogLevelError = 2;
+const int32 kLogLevelFatal = 3;
+
+// Describes a log message and its origin in source code. It is used by the
viettrungluu 2015/11/20 23:21:51 The origin in source code is entirely incidental;
vardhan 2015/12/02 00:06:13 I'll remove this bit then.
+// |mojo::log::Log| service (see log.mojom).
+struct Entry {
+ // Client-side timestamp.
+ int64 timestamp;
+ // Log level: one of |kLogLevel...|.
viettrungluu 2015/11/20 23:21:51 Not necessarily, as indicated by the comment above
vardhan 2015/12/02 00:06:13 Done.
+ int32 log_level;
+
+ // The client source location this log originated from.
+ string? source_file;
+ uint32 source_line = 0;
viettrungluu 2015/11/20 23:21:51 Should comment that: - This is a 1-based line numb
vardhan 2015/12/02 00:06:13 Done.
+
+ string? message;
viettrungluu 2015/11/20 23:21:51 |message| should come before source_file and sourc
vardhan 2015/12/02 00:06:13 Done.
+};

Powered by Google App Engine
This is Rietveld 408576698