Open
Description
Logging diesel's queries via diesel_logger
can be useful outside of unit tests. Currently diesel_logger
's LoggingConnection
is hardcoded to #[cfg(test)]
.
We could instead make this a setting to enable it (e.g. SYNC_DATABASE_DIESEL_LOGGER=true
) or just always enable it if it doesn't cost much in overhead.
This feature could also use a couple more things:
- consider changing the log crate's max value in debug builds to
max_level_debug
(in Cargo.toml). Though this change might add a lot of extra log spew during development (this needs some investigation)? - docs on how to use it (maybe unnecessary or very little needed if Initial Rust project with file structure layout #1 is fixed)