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

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: 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 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..53bac35be6afc273b8f452b79024481820cbe6e6
--- /dev/null
+++ b/mojo/services/log/interfaces/entry.mojom
@@ -0,0 +1,40 @@
+// 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|.
+
+const int32 kLogLevelVerbose = -1;
+const int32 kLogLevelInfo = 0;
+const int32 kLogLevelWarning = 1;
+const int32 kLogLevelError = 2;
+const int32 kLogLevelFatal = 3;
+
+// TODO(vardhan): Should we split this into ClientEntry and ServiceEntry?
+// EntryMetadata is only meant to be used by a log service.
+struct Entry {
+ // Client-supplied information:
+ // Client-side timestamp.
+ int64 timestamp;
+ // Log level: one of |kLogLevel...|.
+ int32 log_level;
+
+ // The client source location this log originated from.
+ string? source_file;
+ uint32 source_line = 0;
+
+ // Message.
+ string? message;
+
+ // Service-supplied information, not set by the client.
+ EntryMetadata? metadata;
+};
+
+struct EntryMetadata {
+ int64 server_timestamp;
+ string source;
+};

Powered by Google App Engine
This is Rietveld 408576698