OLD | NEW |
(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| should be |
| 9 // taken to be equivalent to |kLogLevelFatal|. |
| 10 const int32 kLogLevelVerbose = -1; |
| 11 const int32 kLogLevelInfo = 0; |
| 12 const int32 kLogLevelWarning = 1; |
| 13 const int32 kLogLevelError = 2; |
| 14 const int32 kLogLevelFatal = 3; |
| 15 |
| 16 // Describes a log message and its origin in source code. It is used by the |
| 17 // |mojo::log::Log| service (see log.mojom). |
| 18 struct Entry { |
| 19 // Client-side timestamp, in microseconds. |
| 20 int64 timestamp; |
| 21 // The log level for this message. See the log level constants described |
| 22 // above. |
| 23 int32 log_level; |
| 24 |
| 25 string? message; |
| 26 |
| 27 // The client source file this log entry originated from. It is optional. |
| 28 string? source_file; |
| 29 // |source_line| refers to the line in |source_file| the log entry came from. |
| 30 // |source_line| is ignored if: |
| 31 // - |source_file| is null. |
| 32 // - its value is 0 (which is an invalid value). |
| 33 uint32 source_line = 0; |
| 34 }; |
OLD | NEW |