Log unhandled IRC errors as LOG_INFO in bip.log #8

Manually merged
bip merged 2 commits from Kyoshiro/bip:481_irc_errors into master 2024-02-18 23:46:19 +01:00
Owner

We can discuss the level where this is logged.
I have set to log on bip log level INFO, but then we can move to WARN (not sure this is relevant though).

Fixes https://projects.duckcorp.org/issues/481

We can discuss the level where this is logged. I have set to log on bip log level INFO, but then we can move to WARN (not sure this is relevant though). Fixes https://projects.duckcorp.org/issues/481
Kyoshiro added 1 commit 2024-02-07 09:54:23 +01:00
Kyoshiro force-pushed 481_irc_errors from 56a4c15130 to c14f4634b6 2024-02-08 14:34:41 +01:00 Compare
pilou reviewed 2024-02-18 01:19:28 +01:00
src/line.c Outdated
@ -143,6 +143,13 @@ void irc_line_drop(struct line *line, int elem)
bip_cfree(array_drop(&line->words, elem));
}
unsigned int irc_line_is_error(struct line *line)
Owner

Other functions use int instead of unsigned int. Should unsigned int be used everywhere? Or c99/stdbool.h be used?

Other functions use `int` instead of `unsigned int`. Should `unsigned int` be used everywhere? Or c99/stdbool.h be used?
Author
Owner

I did not realize that, indeed using c99/stdbool.h would make sense, but then that's a somewhat large change.
In the meantime, I've updated the code to use int to match the rest of the code.

Thanks!

I did not realize that, indeed using c99/stdbool.h would make sense, but then that's a somewhat large change. In the meantime, I've updated the code to use `int` to match the rest of the code. Thanks!
pilou marked this conversation as resolved
src/line.c Outdated
@ -146,0 +147,4 @@
{
const char *irc_code = irc_line_elem(line, 0);
const char *error_code = "4";
return (irc_code[0] == error_code[0]);
Owner

Not a request to change: i would have used return *irc_code == '4'; because it seems closer to the style used in this file.

Not a request to change: i would have used `return *irc_code == '4';` because it seems closer to the style used in this file.
Author
Owner

Oh I agree, and it is simpler also.
I don't know why I did that 😆
Thanks again!

Oh I agree, and it is simpler also. I don't know why I did that 😆 Thanks again!
pilou marked this conversation as resolved
Kyoshiro force-pushed 481_irc_errors from c14f4634b6 to ad77e19bfe 2024-02-18 15:27:03 +01:00 Compare
Author
Owner

Force pushed with fixes, thanks!

Force pushed with fixes, thanks!
pilou approved these changes 2024-02-18 23:44:15 +01:00
pilou force-pushed 481_irc_errors from ad77e19bfe to d19099eb3c 2024-02-18 23:46:19 +01:00 Compare
bip manually merged commit d19099eb3c into master 2024-02-18 23:46:19 +01:00
Kyoshiro deleted branch 481_irc_errors 2024-02-19 14:46:56 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bip/bip#8
No description provided.