domjudge
domjudge copied to clipboard
Separate event-feed log per contest
Currently all imported events are written to the same log, if we shadow multiple contests (like for example the BAPC prelims to check for submissions which break the system) debugging is hard as everything is in the same file.
I think this can be fixed here:
./Service/ExternalContestSourceService.php: #[Autowire(service: 'monolog.logger.event-feed-importer')]
together with $this->getSourceContestId()
but I'm not sure if that can be easily injected in the string.
I think we need some compiler pass for this, which is hard or even impossible since it can’t have access to the db. Maybe we should prefix the log entries with something like [cid=10]
? That is easier and then you can grep + tail
I think we need some compiler pass for this, which is hard or even impossible since it can’t have access to the db. Maybe we should prefix the log entries with something like
[cid=10]
? That is easier and then you can grep + tail
That will be next best thing.
Looking at https://symfony.com/doc/current/logging/processors.html this should be doable.