Skip to content

Conversation

@soywod
Copy link
Contributor

@soywod soywod commented Jan 21, 2026

I propose to replace warn! by debug! after few discussions I got with Himalaya users. A warn is often seen as something important, sometimes even invasive, and that can be solved by users (for example, a missing configuration or a insecure setting). In imap-codec context, there is nothing that a lib consumer can do about a rectified malformed message. At this stage it could even be a trace!. Curious to know your opinion.

@coveralls
Copy link
Collaborator

coveralls commented Jan 21, 2026

Pull Request Test Coverage Report for Build 21223455445

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.203%

Changes Missing Coverage Covered Lines Changed/Added Lines %
imap-codec/src/response.rs 1 2 50.0%
Totals Coverage Status
Change from base Build 19733249334: 0.0%
Covered Lines: 10378
Relevant Lines: 11379

💛 - Coveralls

@duesee
Copy link
Owner

duesee commented Jan 23, 2026

Hm... I see where you are coming from and I agree that a warn could make your users (maybe unnecessarily) nervous.

For me, warn is something "unusual" (borderline broken) that, however, our software could cope with w/o user intervention. The negative number case is really a case of a broken server. The impact of rectifying is not clear to me, either. It is better than erroring out but from this point on, the client cache is different from the server state -- whatever that means. So it qualifies as warn to me. debug and trace are directed towards developers and normally not emitted. If we want to emit the syntax quirks in a calmer way, info could be appropriate.

But maybe a question before: Do you want to emit imap-codec logs at all? Are there other logs that are useful?

I'm asking because surely some TLS libraries will emit warnings, too?

@duesee
Copy link
Owner

duesee commented Jan 23, 2026

TL;DR:

The negative number case should be very rare and in my opinion deserves a warning because we rectify user data. The syntax quirks happen regularily (sadly) and rectifying them doesn't change user data. These could be info. debug and trace feel too low-level for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants