#3905 More general CG import logging
Merged by tkopecek. Opened by tkopecek.
tkopecek/koji issue3867  into  master

Download 3905.patch

Related: https://pagure.io/koji/issue/3867

The question is if we don't want to write it directly to final location.

I see a couple instances of os.path.join used here. We should always use joinpath in hub code.

There are some remaining calls to logger.X in the class. Should we alter those as well? I guess perhaps not the ones that are generating errors?

As for final location, I think it makes sense to keep it with the build, though I can see how we might want some sort of separation between the logs from the import and this special one. Perhaps it would make sense to have a new dir under data, e.g. data/import.

OTOH, that would make the log less visible in the ui, so ??

I don't think it's harmful to add cg_import.log under data/logs, esp since that dir is already untracked in the db.

1 new commit added

  • use joinpath

I've added joinpath and modified one more logger call. Anyway, my reasoning was to not block the hub logging in case of any exception being raised. So, I've ignored those preceding raise. I think that having correct traceback in hub log is better in case of failing write to the log file. Anyway, maybe the other option is to try/except writing part and use it everywhere?

Yeah, fine to skip logging in the exception cases.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

rebased onto 2a549d444d11389075247427e1874e6e6de7311c

Commit 5fcba0ba fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata