Closed ghost closed 1 month ago
This logging option is no longer set in the latest version of the book IIRC. See https://github.com/LukeMathWalker/zero-to-production/blob/a48a2a24720f820432a33b070c807b2f448b625f/src/configuration.rs#L51
This is still present in the 20240128 version of the book (at least in both PDF versions)
The latest version I can see on Gumroad is 20230219 and has the problem mentioned here; is there some place I can get a later version? :)
Edit: I found a fix on Discord:
pub fn with_db(&self) -> PgConnectOptions {
self.without_db()
.database(&self.database_name)
.log_statements(tracing_log::log::LevelFilter::Trace)
}
See if you are not forgetting to add use sqlx::ConnectOptions;
It fixed for me.
This has been fixed in the next book release. Closing!
At the end of 5.4.4 there's some code for changing the logging. However, the code does not appear to be in any branch here. Plus, it seems that rust doesn't like it.
and the errors im getting are:
Is this suppose to work like how it does in the book? Or should I ignore it?