Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log validation errors as warning(?) #251

Open
hbruch opened this issue Sep 12, 2023 · 3 comments
Open

Log validation errors as warning(?) #251

hbruch opened this issue Sep 12, 2023 · 3 comments

Comments

@hbruch
Copy link
Collaborator

hbruch commented Sep 12, 2023

Currently, feed validation errors are logged at log level INFO. As invalid feeds might cause unexpected results in downstream processing (as e.g. missing vehicle_types_available currenty does), I suggest to rather log them at level WARNING.

Downside: usually it's up to the feed provider to solve invalid feed issues which might happen or not, so validation issues might clutter the log, potentially hiding issues with the lamassu instance itself.

@testower
Copy link
Collaborator

We could make the log level used for validation errors configurable at least.

@hbruch
Copy link
Collaborator Author

hbruch commented Sep 13, 2023

Or set the level to warning and document how logback could be configured to filter out specific log messages in case they would pollute the log. That way, a very fine grained config would be possible, e.g. just filtering out warnings for well known systems.

@testower
Copy link
Collaborator

I'm not really sure how this would have helped in the example case. We wouldn't have known about it before it happened, and when it happened the problem ended up in an exception. Imho looking at validation metrics or alerting is more useful than scanning logs for these issues.

If you need these though, I think there's already a way to override the log level via properties at class level:

org.entur.lamassu.leader.FeedUpdater.level=WARN

As for logback filtering, I'm not familiar with it, but if you provide some examples and sane defaults, I might consider it.

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

No branches or pull requests

2 participants