DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
713 stars 251 forks source link

Separate event-feed log per contest #2169

Open vmcj opened 11 months ago

vmcj commented 11 months ago

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.

nickygerritsen commented 11 months ago

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

vmcj commented 11 months ago

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.

vmcj commented 11 months ago

Looking at https://symfony.com/doc/current/logging/processors.html this should be doable.