ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.71k stars 1.47k forks source link

Fixed / Extended Logging #1205

Closed fighterii closed 4 years ago

fighterii commented 4 years ago

This PR should fix issue #1140 .

The api.logger is no longer overwritten by set_user method to a new logger without any handlers/formatters/loglevels.

Furthermore it extends the configuration option for logging by introducing two new arguments for API and Bot (loglevel_file and loglevel_stream).

The defaults are the old values (DEBUG for stream; INFO for file) to preserve existing behavior. In my opinion this doesnt make sense, I'd expect the default to be the other way round (less output in the console; more for debugging in the file), but for backwards compatibility I didn't change that.

codecov-io commented 4 years ago

Codecov Report

Merging #1205 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1205   +/-   ##
=======================================
  Coverage   43.61%   43.61%           
=======================================
  Files          32       32           
  Lines        3572     3572           
  Branches      580      580           
=======================================
  Hits         1558     1558           
  Misses       1872     1872           
  Partials      142      142
Impacted Files Coverage Δ
instabot/bot/bot.py 77.17% <100%> (+0.04%) :arrow_up:
instabot/api/api.py 50.32% <100%> (-0.06%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 61cc977...7ec0037. Read the comment docs.

ohld commented 4 years ago

Thanks for great fix1

ohld commented 4 years ago

!!!