Add log rotation (#6564)

* Use flexi_logger; Add log rotation

* Add default rotation; Add FlexiLogger error

* Fix compilation error

* Remove logging to stdout if it's not a tty

* Fix formatting

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Remove needless debug statement

* Default to unlimited size for log rotation

* Add more comments about log-age option

* Remove unused variable

* Fix typo in comment

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
pscott
2020-07-08 12:11:09 +02:00
committed by GitHub
parent 62f306d972
commit 6eb2eb81c5
8 changed files with 324 additions and 84 deletions
+21 -1
View File
@@ -1450,6 +1450,20 @@ dependencies = [
"miniz_oxide",
]
[[package]]
name = "flexi_logger"
version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33897654c23a50cebab45e18356f69fb771c9949a6928344fb1f01ffccc7c5f3"
dependencies = [
"chrono",
"glob 0.3.0",
"log",
"regex",
"thiserror",
"yansi",
]
[[package]]
name = "fnv"
version = "1.0.6"
@@ -6133,8 +6147,8 @@ dependencies = [
"atty",
"chrono",
"derive_more",
"env_logger 0.7.1",
"fdlimit",
"flexi_logger",
"futures 0.3.5",
"lazy_static",
"log",
@@ -9878,6 +9892,12 @@ dependencies = [
"static_assertions",
]
[[package]]
name = "yansi"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71"
[[package]]
name = "zeroize"
version = "1.1.0"