blob: effcb2443e48e1ed5716d3cd9b2e7d34474d036c [file] [log] [blame]
// 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;
};