-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change from `chrono` implementation to impl based on `time` crate, as it has addressed the issues present in RUSTSEC-2020-0159 in its own security advisory: RUSTSEC-2020-071. * Update feather/server/src/logging.rs Co-authored-by: Nick Paladino <[email protected]> * Remove 'simple_logger' from Cargo.toml in feather/utils * Remove 'simple_logger' from Cargo.toml in feather/utils, adding `logging` module that mimics the `feather-server` setup. * Update zeroize in Cargo.lock to avoid RUSTSEC-2021-0115 * Update Cargo.toml/Cargo.lock to new `rsa-der` version 0.3.0 Note that this still leaves the `rsa` issue until the `pem-rfc7468`/`pkcs8` dependency issues are resolved within that crate. * Pin `base64ct` to "=1.1.1" to avoid `edition="2021"` * Update `rsa` to v0.5, Update `rand` to v0.8.0, fix implementation to account for new `RsaPrivateKey` capitalization. * Run cargo update Added `host-fs` and `sys` to `wasmer-wasi` dependencies Removed `time` from the list of `zip` dependencies * Relaxed version constraints on base64ct and time * Removed exact version dependency. Co-authored-by: Noah Coetsee <[email protected]> Co-authored-by: Noah Coetsee <[email protected]> Co-authored-by: Nick Paladino <[email protected]> Co-authored-by: Jacob Emil Ulvedal Rosborg <[email protected]>
- Loading branch information
1 parent
d574826
commit 57ca709
Showing
10 changed files
with
617 additions
and
451 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ edition = "2018" | |
[dependencies] | ||
|
||
[dev-dependencies] | ||
simple_logger = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
use colored::Colorize; | ||
use log::{Level, LevelFilter}; | ||
use time::macros::format_description; | ||
use time::OffsetDateTime; | ||
|
||
pub fn init(level: LevelFilter) { | ||
fern::Dispatch::new() | ||
.format(|out, message, record| { | ||
let level_string = match record.level() { | ||
Level::Error => record.level().to_string().red(), | ||
Level::Warn => record.level().to_string().yellow(), | ||
Level::Info => record.level().to_string().cyan(), | ||
Level::Debug => record.level().to_string().purple(), | ||
Level::Trace => record.level().to_string().normal(), | ||
}; | ||
let target = if !record.target().is_empty() { | ||
record.target() | ||
} else { | ||
record.module_path().unwrap_or_default() | ||
}; | ||
|
||
let datetime: OffsetDateTime = match OffsetDateTime::now_local() { | ||
Ok(x) => x, | ||
Err(_) => OffsetDateTime::now_utc(), | ||
}; | ||
out.finish(format_args!( | ||
"{} {:<5} [{}] {}", | ||
datetime | ||
.format(format_description!( | ||
"[year]-[month]-[day] [hour]:[minute]:[second],[subsecond digits:3]" | ||
)) | ||
.unwrap(), | ||
level_string, | ||
target, | ||
message, | ||
)); | ||
}) | ||
.level(level) | ||
.chain(std::io::stdout()) | ||
.apply() | ||
.unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters