blob: 513d2a3023bcf95c8cf6eea35b10de4e95e0bdad [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
closed protocol LogSettings {
@available(deprecated=12, removed=18, legacy=true)
strict 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.
@available(added=12)
strict SetInterest(struct {
selectors vector<LogInterestSelector>:MAX_LOG_SELECTORS;
}) -> ();
};