rumba icon indicating copy to clipboard operation
rumba copied to clipboard

Migrate to tracing

Open caugner opened this issue 1 month ago • 1 comments

We currently use an outdated version of slog (see: https://github.com/mdn/rumba/pull/663), and should use tracing instead (like rari).


Clippy has 76 errors:

error: use of deprecated macro `::slog_scope::slog_debug`: Use fully qualified macro slog::warn!(...) instead
   --> src/ai/help.rs:125:9
    |
125 |         debug!("url: {}", doc.url);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D deprecated` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(deprecated)]`
    = note: this error originates in the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_debug`: Use fully qualified macro slog::warn!(...) instead
   --> src/ai/help.rs:130:9
    |
130 |         debug!("tokens: {}, token_len: {}", tokens, context_token_len);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_error`: Use fully qualified macro slog::crit!(...) instead
  --> src/api/admin.rs:39:13
   |
39 |             error!("{}", e);
   |             ^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `error` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_error`: Use fully qualified macro slog::crit!(...) instead
   --> src/api/ai_explain.rs:107:17
    |
107 |                 error!("AI Explain cache: {err}");
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `error` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_error`: Use fully qualified macro slog::crit!(...) instead
   --> src/api/ai_explain.rs:125:21
    |
125 |                     error!("{e}");
    |                     ^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `error` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_error`: Use fully qualified macro slog::crit!(...) instead
   --> src/api/ai_help.rs:240:13
    |
240 |             error!("AI Help log: {err}");
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   = note: this error originates in the macro `trace` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_warn`: Use fully qualified macro slog::warn!(...) instead
  --> src/metrics.rs:56:25
   |
56 |                         warn!("⚠️ Metric {} error: {:?} ", &timer.label, e);
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `warn` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_trace`: Use fully qualified macro slog::trace!(...) instead
  --> src/metrics.rs:59:25
   |
59 |                         trace!("⌚ {:?}", v.as_metric_str());
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `trace` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_warn`: Use fully qualified macro slog::warn!(...) instead
  --> src/metrics.rs:76:21
   |
76 |                     warn!("⚠️ metric error: No App State");
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the macro `warn` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_trace`: Use fully qualified macro slog::trace!(...) instead
   --> src/metrics.rs:134:9
    |
134 |         trace!("⌚ Starting timer... {:?}", &label; &mtags);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `trace` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_warn`: Use fully qualified macro slog::warn!(...) instead
   --> src/metrics.rs:164:21
    |
164 |                     warn!("⚠️ Metric {} error: {:?} ", label, e; mtags);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `warn` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_trace`: Use fully qualified macro slog::trace!(...) instead
   --> src/metrics.rs:166:26
    |
166 |                 Ok(v) => trace!("☑️ {:?}", v.as_metric_str()),
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `trace` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_warn`: Use fully qualified macro slog::warn!(...) instead
   --> src/metrics.rs:192:21
    |
192 |                     warn!("⚠️ Metric {} error: {:?} ", label, e; mtags);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `warn` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_trace`: Use fully qualified macro slog::trace!(...) instead
   --> src/metrics.rs:194:26
    |
194 |                 Ok(v) => trace!("☑️ {:?}", v.as_metric_str()),
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `trace` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `::slog_scope::slog_warn`: Use fully qualified macro slog::warn!(...) instead
   --> src/metrics.rs:228:13
    |
228 |             warn!("⚠️ Metric send error:  {:?}", err);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `warn` (in Nightly builds, run with -Z macro-backtrace for more info)

error: use of deprecated macro `slog::slog_o`: Use fully qualified macro slog::o!(...) instead
 --> src/logging.rs:3:12
  |
3 | use slog::{slog_o, Drain};
  |            ^^^^^^

error: could not compile `rumba` (lib) due to 76 previous errors

caugner avatar Nov 24 '25 08:11 caugner