blob: 9413444970000cd00095903d3af311c92b251d01 [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.
@discoverable
protocol LogSettings {
/// Requests a change in interest for the matched components.
///
/// Each component holds a set of requested interests.
///
/// When a new request on LogSettings#RegisterInterest is received,
/// the sets for matched components receive the new minimum interest.
/// If the interest is less than the previous minimum interest, then a
/// `RegisterInterest` request is sent with the new minimum interest.
///
/// If a connection to `LogSettings` sends another `RegisterInterest`
/// 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.
RegisterInterest(struct {
selectors vector<LogInterestSelector>:MAX_LOG_SELECTORS;
});
};