Closed sweep-ai[bot] closed 1 year ago
GitHub actions yielded the following error.
The command that failed is cargo install clippy-sarif sarif-fmt
. Here are the relevant lines from the logs:
error[E0507]: cannot move out of `*self` which is behind a shared reference
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo_metadata-0.15.4/src/diagnostic.rs:95:24
|
95 | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
| ^^^^^^^^^
| |
| data moved here
| move occurs because `unrecognized` has type `Applicability`, which does not implement the `Copy` trait
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider borrowing here
|
95 | #[derive(Debug, Clone, &Serialize, Deserialize, PartialEq, Eq, Hash)]
| +
error[E0507]: cannot move out of `*self` which is behind a shared reference
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo_metadata-0.15.4/src/messages.rs:104:24
|
104 | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]
| ^^^^^^^^^
| |
| data moved here
| move occurs because `unrecognized` has type `Message`, which does not implement the `Copy` trait
|
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider borrowing here
|
104 | #[derive(Debug, Clone, &Serialize, Deserialize, PartialEq, Eq, Hash)]
| +
For more information about this error, try `rustc --explain E0507`.
error: could not compile `cargo_metadata` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
There are a lot of errors. This is likely due to a small parsing issue or a missing import with the files changed in the PR.
This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.
I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.
Description
This PR modifies the
log.rs
file to support logging to a.log
file instead of logging to the console. The current implementation only uses theprintln!
macro for logging, which is not suitable for a production environment. The changes include:log
andsimplelog
crates.Logger
field in theLog
struct with aFileLogger
field from thesimplelog
crate.new
function to usesimplelog::FileLogger::new
to create a logger that logs to a file with a timestamp in the file name.println!
calls with calls to the appropriate logging functions from thelog
crate.Summary
This PR addresses the issue #31 by enhancing the logging system in the Fluere project. The changes allow logs to be written to a
.log
file instead of the console, making them persistent and easily accessible for debugging and monitoring purposes. The log level can be configured, and each run of the program creates a new log file with a timestamp in the file name.Fixes #31.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest mprovements to Sweep:
💡 To get Sweep to edit this pull request, you can: