CAIDA / libbgpstream

Client-side C library and CLI tool of the BGPStream project
https://bgpstream.caida.org
BSD 2-Clause "Simplified" License
44 stars 26 forks source link

Downgrade parsebgp invalid message log to warning #215

Closed alistairking closed 3 years ago

alistairking commented 3 years ago

We're already returning a corrupted record message in-band (just a few lines after this log), so there's no need for an error-level log. Even a warning log is probably even overkill.

In general it would be nice to have a mechanism for passing "error" messages to the user without just spewing them to stderr. librdkafka has something like this where one can register an error callback and then the user can decide what they want to do with the messages.

But in the short term, let's find cases like this where we can downgrade (or even remove) logs so that we reserve error-level messages for when things have really gone wrong and we can't communicate that information in-band?

alistairking commented 3 years ago

Ok, this turned out to be slightly more complicated than just downgrading the error.