Crate fuchsia_syslog[][src]

Rust fuchsia logger library.

Modules

levels

Encapsulates Log Levels.

macros

Convenient re-export of macros for globed imports Rust Edition 2018

Macros

fx_log

Convenience macro for logging.

fx_log_debug

Convenience macro to log debug info.

fx_log_err

Convenience macro to log error.

fx_log_info

Convenience macro to log information.

fx_log_trace

Convenience macro to log trace info.

fx_log_warn

Convenience macro to log warning.

fx_vlog

Convenience macro to log verbose messages.

Structs

LOGGER

Global reference to default logger object.

Logger

C API logger wrapper which provides wrapper for C APIs.

Constants

COMPONENT_NAME_PLACEHOLDER_TAG

A placeholder tag which indicates to a LogSink that the tag should be replaced with the actual name of the logging component. If that name is unavailable, LogSink implementations should replace this value with UNKNOWN.

Functions

build_with_tags_and_socket

Initialize and return a syslogger that uses the sink socket.

get_fx_logger_level

Maps log crate log levels to syslog severity levels.

get_severity_from_verbosity

Get the severity corresponding to the given verbosity. Note that verbosity relative to the default severity and can be thought of as incrementally “more vebose than” the baseline.

init

Initializes syslogger using default options.

init_with_socket_and_name

Initialize syslogger with a single tag and a log service channel socket.

init_with_tags

Initializes syslogger with tags. Max number of tags can be 4 and max length of each tag can be 63 characters.

is_enabled

Checks if default logger is enabled for given log level.

log_helper

macro helper function to convert strings and call log

set_severity

Set default logger severity.

set_verbosity

Set default logger verbosity.