/*
 * Copyright (C) 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = "proto2";

import "protos/perfetto/common/protolog_common.proto";

package perfetto.protos;

// Custom configuration for the "android.protolog" data source.
// ProtoLog is a logging mechanism that is intented to be more efficient than
// logcat. This configures what logs to capture in the tracing instance.
message ProtoLogConfig {
  // Specified the configurations for each of the logging groups. If none is
  // specified for a group the defaults will be used.
  repeated ProtoLogGroup group_overrides = 1;
}

message ProtoLogGroup {
  // The ProtoLog tag this configuration entry applies to.
  optional string tag = 1;
  // Specify the level from which to start capturing protologs.
  // e.g. if ProtoLogLevel.WARN is specified only warning, errors and fatal log
  // message will be traced.
  optional ProtoLogLevel log_from = 2;
}
