PROTOCOLS
Log
Defined in fuchsia.logger/logger.fidl
Interface for LogListenerSafe to register to listen to logs.
DumpLogsSafe
Dumps all cached logs by calling LogMany() followed by Done() on log_listener
.
A null options
indicates no filtering is requested.
Request
Name | Type |
---|---|
log_listener |
client_end:LogListenerSafe
|
options |
LogFilterOptions?
|
ListenSafe
Dumps all cached logs by calling LogMany() in batches followed by Log() for each new log
message.
A null options
indicates no filtering is requested.
Request
Name | Type |
---|---|
log_listener |
client_end:LogListenerSafe
|
options |
LogFilterOptions?
|
ListenSafeWithSelectors
Listens to new log entries by calling Log() on log_listener
.
A null options
indicates no filtering is requested.
Request
Name | Type |
---|---|
log_listener |
client_end:LogListenerSafe
|
options |
LogFilterOptions?
|
selectors |
vector<fuchsia.diagnostics/LogInterestSelector>:64
|
LogListenerSafe
Defined in fuchsia.logger/logger.fidl
A listener who will notify the Log
of the receipt of each message.
Done
Called when this listener was passed to DumpLogsSafe()
and all cached logs have been sent.
Request
<EMPTY>
Log
Called for single messages.
The return value is used for flow control, and implementers should acknowledge receipt of each message in order to continue receiving future messages.
Request
Name | Type |
---|---|
log |
LogMessage
|
Response
<EMPTY>
LogMany
Called when serving cached logs.
Max logs size per call is MAX_LOG_MANY_SIZE_BYTES
bytes.
The return value is used for flow control, and implementers should acknowledge receipt of each batch in order to continue receiving future messages.
Request
Name | Type |
---|---|
log |
vector<LogMessage>
|
Response
<EMPTY>
LogSink
Defined in fuchsia.logger/logger.fidl
Drains a program's logs.
Connect
Send this socket to be drained.
See wire_format.h for what is expected to be received over the socket.
Request
Name | Type |
---|---|
socket |
handle<socket>
|
ConnectStructured
Send this socket to be drained, using the structured logs format.
See Encoding structured records for what is expected to be received over the socket.
Request
Name | Type |
---|---|
socket |
handle<socket>
|
WaitForInterestChange
LogSink implementers will return to this hanging-get whenever the scope of their interest changes. Clients are expected to emit messages based on the registered Interest. In the event that an empty interest is conveyed, clients should emit messages based on their default e.g. compile time configuration. Each client may only poll this once at a time. Invoking WaitForInterestChange a second time before the first call returns will result in an error being returned.
Request
<EMPTY>
Response
Name | Type |
---|---|
payload |
LogSink_WaitForInterestChange_Result
|
STRUCTS
LogFilterOptions
Defined in fuchsia.logger/logger.fidl
Field | Type | Description | Default |
---|---|---|---|
filter_by_pid |
bool
|
No default | |
pid |
uint64
|
No default | |
filter_by_tid |
bool
|
No default | |
tid |
uint64
|
No default | |
verbosity |
uint8
|
If more than zero, logs would be filtered based on verbosity and
|
No default |
min_severity |
LogLevelFilter
|
Severity used as threshold to determine logging level. |
No default |
tags |
vector<string:63>:16
|
If non-empty, return all messages which contain at least one specified
tag. If empty, messages will not be filtered by tag.
Passed tags should not be more than |
No default |
LogMessage
Defined in fuchsia.logger/logger.fidl
Field | Type | Description | Default |
---|---|---|---|
pid |
uint64
|
No default | |
tid |
uint64
|
No default | |
time |
zx/InstantBoot
|
Added: 25
|
No default |
severity |
int32
|
No default | |
dropped_logs |
uint32
|
See wire_format.h. As messages can be served out of order, this should only be logged if more than last count. |
No default |
tags |
vector<string:63>:5
|
No default | |
msg |
string:32768
|
No default |
LogSink_WaitForInterestChange_Response
Defined in fuchsia.logger/logger.fidl
Field | Type | Description | Default |
---|---|---|---|
data |
fuchsia.diagnostics/Interest
|
No default |
ENUMS
InterestChangeError strict
Type: uint32
Defined in fuchsia.logger/logger.fidl
Name | Value | Description |
---|---|---|
CALLED_TWICE |
1 |
Incorrectly called WaitForInterestChange twice without waiting for the first call to return. |
LogLevelFilter strict
Type: int8
Defined in fuchsia.logger/logger.fidl
Log levels used with log related filtering. Filtering uses a heuristic based on a threshold of minimum severity level - with any log equal to or greater than the threshold being included in the printable logs.
Name | Value | Description |
---|---|---|
TRACE |
16 |
|
DEBUG |
32 |
|
INFO |
48 |
|
WARN |
64 |
|
ERROR |
80 |
|
FATAL |
96 |
|
NONE |
127 |
UNIONS
LogSink_WaitForInterestChange_Result strict
Defined in fuchsia.logger/logger.fidl
Ordinal | Variant | Type | Description |
---|---|---|---|
1 |
response |
LogSink_WaitForInterestChange_Response
|
|
2 |
err |
InterestChangeError
|
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
LOG_LEVEL_DEFAULT | Default log level used to initialize loggers. |
||
LOG_SEVERITY_MAX_STEP |
6
|
uint8 |
Maximum available log severity. |
LOG_SEVERITY_STEP_SIZE |
16
|
uint8 |
The interval between discrete log severity levels |
LOG_VERBOSITY_STEP_SIZE |
1
|
uint8 |
The interval between discrete log verbosity levels |
MAX_DATAGRAM_LEN_BYTES |
32768
|
uint32 |
Max byte size for message payload. |
MAX_LOG_MANY_SIZE_BYTES |
16384
|
uint64 |
Max log bytes per call to a listener. |
MAX_TAGS |
16
|
uint8 |
Max number of tags that can be passed to filter by listener. |
MAX_TAGS_PER_LOG_MESSAGE |
5
|
uint8 |
Max tags that will be attached to a LogMessage. |
MAX_TAG_LEN_BYTES |
63
|
uint8 |
Max tag length that can be passed to filter by listener. |