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.
|
+}; |