]> git.proxmox.com Git - rustc.git/blobdiff - vendor/log/src/lib.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / vendor / log / src / lib.rs
index 259814d0d15a561723db2ccc8966653fb2ee0d98..4ead8262138904cf6ebf69a74675deda6069eeca 100644 (file)
 //!     * [systemd-journal-logger]\r
 //!     * [android_log]\r
 //!     * [win_dbg_logger]\r
+//!     * [db_logger]\r
 //! * For WebAssembly binaries:\r
 //!     * [console_log]\r
 //! * For dynamic libraries:\r
 //! [slog-stdlog]: https://docs.rs/slog-stdlog/*/slog_stdlog/\r
 //! [log4rs]: https://docs.rs/log4rs/*/log4rs/\r
 //! [fern]: https://docs.rs/fern/*/fern/\r
-//! [systemd-journal-logger]: (https://docs.rs/systemd-journal-logger/*/systemd_journal_logger/)\r
-//! [android_log]: (https://docs.rs/android_log/*/android_log/)\r
-//! [win_dbg_logger]: (https://docs.rs/win_dbg_logger/*/win_dbg_logger/)\r
-//! [console_log]: (https://docs.rs/console_log/*/console_log/)\r
+//! [systemd-journal-logger]: https://docs.rs/systemd-journal-logger/*/systemd_journal_logger/\r
+//! [android_log]: https://docs.rs/android_log/*/android_log/\r
+//! [win_dbg_logger]: https://docs.rs/win_dbg_logger/*/win_dbg_logger/\r
+//! [console_log]: https://docs.rs/console_log/*/console_log/\r
 \r
 #![doc(\r
     html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",\r
     html_favicon_url = "https://www.rust-lang.org/favicon.ico",\r
-    html_root_url = "https://docs.rs/log/0.4.16"\r
+    html_root_url = "https://docs.rs/log/0.4.17"\r
 )]\r
 #![warn(missing_docs)]\r
 #![deny(missing_debug_implementations, unconditional_recursion)]\r
@@ -1272,10 +1273,18 @@ pub trait Log: Sync + Send {
     /// This is used by the `log_enabled!` macro to allow callers to avoid\r
     /// expensive computation of log message arguments if the message would be\r
     /// discarded anyway.\r
+    ///\r
+    /// # For implementors\r
+    ///\r
+    /// This method isn't called automatically by the `log!` macros.\r
+    /// It's up to an implementation of the `Log` trait to call `enabled` in its own\r
+    /// `log` method implementation to guarantee that filtering is applied.\r
     fn enabled(&self, metadata: &Metadata) -> bool;\r
 \r
     /// Logs the `Record`.\r
     ///\r
+    /// # For implementors\r
+    ///\r
     /// Note that `enabled` is *not* necessarily called before this method.\r
     /// Implementations of `log` should perform all necessary filtering\r
     /// internally.\r