Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogLevel and LogLevelFilter doc improvements. #157

Merged
merged 1 commit into from May 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/lib.rs
Expand Up @@ -247,9 +247,12 @@ static MAX_LOG_LEVEL_FILTER: AtomicUsize = ATOMIC_USIZE_INIT;
static LOG_LEVEL_NAMES: [&'static str; 6] = ["OFF", "ERROR", "WARN", "INFO",
"DEBUG", "TRACE"];

/// An enum representing the available verbosity levels of the logging framework
/// An enum representing the available verbosity levels of the logging framework.
///
/// A `LogLevel` may be compared directly to a `LogLevelFilter`.
/// Typical usage includes: checking if a certain `LogLevel` is enabled with
/// [`log_enabled!`](macro.log_enabled.html), specifying the `LogLevel` of
/// [`log!`](macro.log.html), and comparing a `LogLevel` directly to a
/// [`LogLevelFilter`](enum.LogLevelFilter.html).
#[repr(usize)]
#[derive(Copy, Eq, Debug, Hash)]
pub enum LogLevel {
Expand Down Expand Up @@ -389,7 +392,11 @@ impl LogLevel {
/// An enum representing the available verbosity level filters of the logging
/// framework.
///
/// A `LogLevelFilter` may be compared directly to a `LogLevel`.
/// A `LogLevelFilter` may be compared directly to a [`LogLevel`](enum.LogLevel.html).
/// Use this type to [`get()`](struct.MaxLogLevelFilter.html#method.get) and
/// [`set()`](struct.MaxLogLevelFilter.html#method.set) the
/// [`MaxLogLevelFilter`](struct.MaxLogLevelFilter.html), or to match with the getter
/// [`max_log_level()`](fn.max_log_level.html).
#[repr(usize)]
#[derive(Copy, Eq, Debug, Hash)]
pub enum LogLevelFilter {
Expand Down