blob: 2194357ba1a73d3c6073ec2ef1e25548265785e6 [file] [log] [blame]
Ben Murdochbb1529c2013-08-08 10:24:53 +01001// Copyright 2013 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// Use chrome.logPrivate API to retrieve log information from multiple
6// resources in a consistent format.
7namespace logPrivate {
8
9 // A filter class that filters log entries by different fields
10 dictionary Filter {
11 // Only logs from |sources| will be returned.
12 DOMString[] sources;
13 // Only logs created in [|start_timestamp|, |end_timestamp|] will
14 // be returned.
15 double start_timestamp;
16 double end_timestamp;
17 // Only logs have process name in |process| will be returned.
18 DOMString[] process;
19 // Only logs have level in |level| will be returned.
20 DOMString[] level;
21 };
22
23 // The class that contains log information.
24 dictionary LogEntry {
25 // The time of the log in milliseconds.
26 double timestamp;
27 // The raw text of log.
28 DOMString full_entry;
29 // The name of the process that the log associated with.
30 DOMString process;
31 // The ID of the process that the log associated with.
32 DOMString process_id;
33 // The log level.
34 DOMString level;
35 };
36
37 // The class that is returned to callback function.
38 dictionary Result {
39 // The filter specified to filter log result.
40 Filter filter;
41 // Log entries returned based on the filter.
42 LogEntry[] data;
43 };
44
45 callback GetHistoricalCallback = void (Result res);
46
47 interface Functions {
48 // Get the existing logs from ChromeOS system.
49 static void getHistorical(Filter filter, GetHistoricalCallback callback);
50 };
51
52};