ソースを参照

Adding the hability to choose wich feature to enable (colorized output or timestamps) and editing README.md to reflect the new choice availability

fabio h 4 年 前
コミット
4449f07d93
2 ファイル変更19 行追加1 行削除
  1. 2 0
      Cargo.toml
  2. 17 1
      README.md

+ 2 - 0
Cargo.toml

@@ -9,6 +9,8 @@ edition = "2018"
 
 [features]
 default = ["colored", "chrono"]
+color = ["colored"]
+ts = ["chrono"]
 
 [dependencies]
 log = { version = "^0.4.5", features = ["std"] }

+ 17 - 1
README.md

@@ -33,7 +33,7 @@ You can run the above example with:
 cargo run --example init
 ```
 
-If you want to remove the colorized output and its dependencies, add the
+If you want to remove the colorized output and the timestamps with its respective dependencies, add the
 the following to your Cargo.toml:
 
 ```
@@ -41,6 +41,22 @@ the following to your Cargo.toml:
 default-features = false
 ```
 
+Or to remove only the colorized output but keep the timestamps:
+
+```
+[dependencies.simple_logger]
+default-features = false
+features = ["ts"]
+```
+
+Or to remove only the timestamps but keep the colorized output:
+
+```
+[dependencies.simple_logger]
+default-features = false
+features = ["color"]
+```
+
 Licence
 -------