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

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: relax MojoLogger.SetMinimumLogLevel thread-safety & related comments. Created 5 years 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..effcb2443e48e1ed5716d3cd9b2e7d34474d036c
--- /dev/null
+++ b/mojo/services/log/interfaces/entry.mojom
@@ -0,0 +1,34 @@
+// 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| 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;
+
+// Describes a log message and its origin in source code. It is used by the
+// |mojo::log::Log| service (see log.mojom).
+struct Entry {
+ // Client-side timestamp, in microseconds.
+ int64 timestamp;
+ // The log level for this message. See the log level constants described
+ // above.
+ int32 log_level;
+
+ string? message;
+
+ // The client source file this log entry originated from. It is optional.
+ string? source_file;
+ // |source_line| refers to the line in |source_file| the log entry came from.
+ // |source_line| is ignored if:
+ // - |source_file| is null.
+ // - its value is 0 (which is an invalid value).
+ uint32 source_line = 0;
+};

Powered by Google App Engine
This is Rietveld 408576698