| // 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; |
| |
| using fuchsia.diagnostics.types; |
| |
| /// 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, |
| @available(replaced=27) |
| 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; |
| }; |
| |
| @available(added=27) |
| 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 fuchsia.diagnostics.types.Interest; |
| }; |
| |
| /// This protocol allows clients to modify the logging behavior of components |
| /// in the system. |
| @discoverable(client="platform", server="platform") |
| closed protocol LogSettings { |
| @available(deprecated=12, removed=18) |
| 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, removed=27) |
| strict SetInterest(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#SetComponentInterest is received, |
| /// the sets for matched components receive the new minimum interest. |
| /// If the interest is less than the previous minimum interest, then a |
| /// `SetComponentInterest` request is sent with the new minimum interest. |
| /// |
| /// If a connection to `LogSettings` sends another `SetComponentInterest` |
| /// request, its previous interest request will be undone. |
| /// |
| /// When the connection to `LogSettings` is finished, the interests are |
| /// undone, unless persist is set to true. Each matched component minimum |
| /// interest is updated with the new minimum interest in the set. |
| @available(added=27) |
| strict SetComponentInterest(table { |
| /// List of selectors. Required. |
| 1: selectors vector<LogInterestSelector>:MAX_LOG_SELECTORS; |
| /// Whether or not to persist the setting change after disconnection. |
| /// Optional. Defaults to false. |
| 2: persist bool; |
| }) -> (); |
| }; |