diff options
| author | Sakarias Johansson <sakarias.johansson@goodbyekansas.com> | 2023-03-21 23:09:15 +0100 |
|---|---|---|
| committer | Sakarias Johansson <sakariasjohansson@hotmail.com> | 2023-04-05 19:38:04 +0200 |
| commit | 5b6e06928bbd5466d0c65149e8c7e44871e71a8c (patch) | |
| tree | 7165d767e67b99404e9b382a2494f46d4a6ea35f /racer-tracer/src/error.rs | |
| parent | ed8de4988d3f1c81bc4ca833c760dce1497e99d7 (diff) | |
| download | racer-tracer-5b6e06928bbd5466d0c65149e8c7e44871e71a8c.tar.gz racer-tracer-5b6e06928bbd5466d0c65149e8c7e44871e71a8c.tar.xz racer-tracer-5b6e06928bbd5466d0c65149e8c7e44871e71a8c.zip | |
📖 Add logging and term writes
println works for a while. Was time to set up something better. Worth
to not that there is a big difference between logging and writing to
the terminal which is why both slog and console was dragged in. Might
seem similar but purpose is not the same.
Most of the time the log is interesting during runtime but user
messages does not belong in the log.
Diffstat (limited to 'racer-tracer/src/error.rs')
| -rw-r--r-- | racer-tracer/src/error.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/racer-tracer/src/error.rs b/racer-tracer/src/error.rs index b7cb46d..d9b13ab 100644 --- a/racer-tracer/src/error.rs +++ b/racer-tracer/src/error.rs @@ -46,6 +46,9 @@ pub enum TracerError { #[error("Key callback failed: {0}")] KeyError(String), + + #[error("Failed to create log: {0}")] + CreateLogError(String), } impl From<TracerError> for i32 { @@ -69,6 +72,7 @@ impl From<TracerError> for i32 { TracerError::SceneLoad(_) => 13, TracerError::ArgumentParsingError(_) => 14, TracerError::KeyError(_) => 15, + TracerError::CreateLogError(_) => 16, } } } |
