blob: 3c8ffd2dd85e45e28e8213b3192ded4934eee00c [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.diagnostics;
/// Max number of LogInterestSelectors that can be specified via a listener.
const MAX_LOG_SELECTORS uint8 = 64;
/// A specified Interest coupled with its designated target,
type LogInterestSelector = struct {
/// Matches the components for which the interest will be requested.
selector ComponentSelector;
/// The interest level that will be sent to components matching the selector.
interest Interest;
/// This protocol allows clients to modify the logging behavior of components
/// in the system.
protocol LogSettings {
RegisterInterest(struct {
selectors vector<LogInterestSelector>:MAX_LOG_SELECTORS;
/// Requests a change in interest for the matched components.
/// Each component holds a set of requested interests.
/// When a new request on LogSettings#SetInterest is received,
/// the sets for matched components receive the new minimum interest.
/// If the interest is less than the previous minimum interest, then a
/// `SetInterest` request is sent with the new minimum interest.
/// If a connection to `LogSettings` sends another `SetInterest`
/// request, its previous interest request will be undone.
/// When the connection to `LogSettings` is finished, the interests are
/// undone. Each matched component minimum interest is updated with the
/// new minimum interest in the set.
SetInterest(struct {
selectors vector<LogInterestSelector>:MAX_LOG_SELECTORS;
}) -> ();