mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 20:06:30 +03:00
Log messages in info!() if DCC_MIME_DEBUG is set
Using println!() leads to reordered output on terminal. Moreover, println!() prints to stdout which is not for logging.
This commit is contained in:
@@ -94,9 +94,12 @@ pub(crate) async fn receive_imf_inner(
|
||||
) -> Result<Option<ReceivedMsg>> {
|
||||
info!(context, "Receiving message, seen={}...", seen);
|
||||
|
||||
if std::env::var(crate::DCC_MIME_DEBUG).unwrap_or_default() == "2" {
|
||||
info!(context, "receive_imf: incoming message mime-body:");
|
||||
println!("{}", String::from_utf8_lossy(imf_raw));
|
||||
if std::env::var(crate::DCC_MIME_DEBUG).is_ok() {
|
||||
info!(
|
||||
context,
|
||||
"receive_imf: incoming message mime-body:\n{}",
|
||||
String::from_utf8_lossy(imf_raw),
|
||||
);
|
||||
}
|
||||
|
||||
let mut mime_parser =
|
||||
|
||||
Reference in New Issue
Block a user