Closed nils-herrmann closed 2 weeks ago
Code Climate has analyzed commit d32ed0bc and detected 1 issue on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 1 |
View more on Code Climate.
That's a good start already. But we need to write it such that the file comes out fresh when I initiate a new Original()
. Maybe we put the creation of the logfile in there, and move the log file connection around as private attribute?
And finally two requests on the stored information:
The LOG_FILE.log
now has entries like:
24-11-05 21:04:40 - DEBUG:
- Scopus class: AuthorSearch
- View: STANDARD
- Query: AU-ID(53164702100)
- Nr Results: 1
24-11-05 21:04:41 - DEBUG:
- Scopus class: ScopusSearch
- View: COMPLETE
- Query: REF(55208373700 OR 55208373700) AND PUBYEAR BEF 2017 AND NOT AU-ID(55208373700) AND NOT AU-ID(55208373700)
- Nr Results: 0
24-11-05 21:04:42 - DEBUG:
- Scopus class: ScopusSearch
- View: COMPLETE
- Query: REF(2-s2.0-84959420483 OR 2-s2.0-84949113230) AND PUBYEAR BEF 2017 AND NOT AU-ID(55208373700) AND NOT AU-ID(55208373700)
- Nr Results: 0
Yeah, that looks great! Let's just change some words here and then we're done:
A log entry now looks like this:
24-11-11 09:59:52 - DEBUG:
- Scopus API: Scopus Search
- View: COMPLETE
- Query: SOURCE-ID(14204) AND PUBYEAR IS 1984
- Results: 730
Last request: Can you please move all the new functions from sosia/utils/logger.py
to sosia/establishing/logger.py
? (And then remove the new utils
folder again.)
I moved the file to the establishing
folder (and changed the corresponding imports).
What do you mean by this?
(And then remove the new utils folder again.)
What do you mean by this?
(And then remove the new utils folder again.)
You created a new utils
folder. But you removed it already, so all is fine. Thanks, Nils!
New PR to avoid confusion due to merge conflicts and commit reversions.
Log all queries made with
ScopusSearch()
andAuthorSearch()
atDEBUG
level in~/.cache/sosia/sosia.log