• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19import "protos/perfetto/common/protolog_common.proto";
20
21package perfetto.protos;
22
23// Custom configuration for the "android.protolog" data source.
24// ProtoLog is a logging mechanism that is intented to be more efficient than
25// logcat. This configures what logs to capture in the tracing instance.
26message ProtoLogConfig {
27  enum TracingMode {
28    // When using the DEFAULT tracing mode, only log groups and levels specified
29    // in the group_overrides are traced.
30    DEFAULT = 0;
31    // When using the ENABLE_ALL tracing mode, all log groups and levels are
32    // traced, unless specified in the group_overrides.
33    ENABLE_ALL = 1;
34  }
35
36  // Specified the configurations for each of the logging groups. If none is
37  // specified for a group the defaults will be used.
38  repeated ProtoLogGroup group_overrides = 1;
39  // Specified what tracing mode to use for the tracing instance.
40  optional TracingMode tracing_mode = 2;
41}
42
43message ProtoLogGroup {
44  // The ProtoLog group name this configuration entry applies to.
45  optional string group_name = 1;
46  // Specify the level from which to start capturing protologs.
47  // e.g. if ProtoLogLevel.WARN is specified only warning, errors and fatal log
48  // message will be traced.
49  optional ProtoLogLevel log_from = 2;
50  // When set to true we will collect the stacktrace for each protolog message
51  // in this group that we are tracing.
52  optional bool collect_stacktrace = 3;
53}
54