浏览代码

Some minor documentation tweaks

Sam Clements 3 年之前
父节点
当前提交
e6643bdd93
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      src/lib.rs

+ 5 - 4
src/lib.rs

@@ -1,4 +1,4 @@
-//! A logger that prints all messages with a readable output format.
+//! A logger that prints all messages with a simple, readable output format.
 
 #[cfg(feature = "chrono")]
 use chrono::Local;
@@ -7,6 +7,10 @@ use colored::*;
 use log::{Level, LevelFilter, Log, Metadata, Record, SetLoggerError};
 use std::collections::HashMap;
 
+/// Implements [`Log`] and a set of simple builder methods for configuration.
+///
+/// Use the various "builder" methods on this struct to configure the logger,
+/// then call [`init`] to configure the [`log`] crate.
 pub struct SimpleLogger {
     /// The default logging level
     default_level: LevelFilter,
@@ -29,9 +33,6 @@ impl SimpleLogger {
     /// Initializes the global logger with a SimpleLogger instance with
     /// default log level set to `Level::Trace`.
     ///
-    /// You may use the various builder-style methods on this type to configure
-    /// the logger, and you must call [`init`] in order to start logging messages.
-    ///
     /// ```no_run
     /// use simple_logger::SimpleLogger;
     /// SimpleLogger::new().init().unwrap();