domjudge icon indicating copy to clipboard operation
domjudge copied to clipboard

Separate event-feed log per contest

Open vmcj opened this issue 1 year ago • 3 comments

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.

vmcj avatar Sep 30 '23 10:09 vmcj

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

nickygerritsen avatar Sep 30 '23 11:09 nickygerritsen

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 avatar Sep 30 '23 11:09 vmcj

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

vmcj avatar Oct 07 '23 09:10 vmcj