paracrawl / Domain_Adaptation

InDomain detection is a tool designed to extract in-domain data from a large collections of data.
GNU General Public License v3.0
1 stars 1 forks source link

I'm confused by the logger #24

Closed kpu closed 4 years ago

kpu commented 5 years ago

Sometimes you print to stdout, sometimes you log. Can we just print to stderr consistently and remove the logger entirely? There's already a standard place to put logs: stderr. It will make configuration easier.

https://github.com/paracrawl/Domain_Adaptation/blob/cbd4c9109fff2e4a3978f84165df4552b67b1810/lib/ScorePoolData.py#L142 https://github.com/paracrawl/Domain_Adaptation/blob/cbd4c9109fff2e4a3978f84165df4552b67b1810/lib/ScorePoolData.py#L153 https://github.com/paracrawl/Domain_Adaptation/blob/cbd4c9109fff2e4a3978f84165df4552b67b1810/lib/ScorePoolData.py#L149

Aside: it's weird for a for loop to have the same log message every iteration of the loop.

kpu commented 5 years ago

This will also remove the problem that the program can't really be run concurrently by default since it writes to a file in the current directory... https://github.com/paracrawl/Domain_Adaptation/blob/cbd4c9109fff2e4a3978f84165df4552b67b1810/lib/FullProcess.py#L54

dalisola commented 5 years ago

Already update and remove the logger entirely .

kpu commented 5 years ago

stderr != stdout. I asked for stderr.