So9q added a comment.

  In T272088#7772946 <https://phabricator.wikimedia.org/T272088#7772946>, 
@maynorc wrote:
  
  > In T272088#7661705 <https://phabricator.wikimedia.org/T272088#7661705>, 
@So9q wrote:
  >
  >> In T272088#6751351 <https://phabricator.wikimedia.org/T272088#6751351>, 
@Xqt wrote:
  >>
  >>> I see. 'pywiki' logger will be initialized to level 11 and there is no 
easy way to change that. As a work-around you can modify the logger after it 
was initialized e.g.
  >>>
  >>>   import logging
  >>>   import pywikibot
  >>>   pywikibot.output('This will initialize the logger')
  >>>   logger = logging.getLogger('pywiki')
  >>>   logger.setLevel(logging.WARNING)
  >>>   pywikibot.output('This message will not be logged anymore')
  >>>   pywikibot.log('Also verbose lgs are hidden')
  >>>   pywikibot.warning('Warnings are still logged')
  >>>   pywikibot.error('Errors are logged too.)
  >>
  >> This workaround did not work for me  :/
  >>
  >> I commented out the whole content of bot.py: writelogheader() and that did 
the trick!
  >
  > @So9q, starting to work on this item now; by "did not work" do you mean you 
still see the ~300 lines of verbose log output? What platform are you running 
on?
  
  Yes, PyCharm on W10 <https://phabricator.wikimedia.org/W10>. Version 7.2.0
  See the source code here 
https://github.com/internetarchive/wcdimportbot/blob/92ee7310a10195ce8d202a1b829ddb9a2afd8578/src/__init__.py#L18
  F35103737: bild.png <https://phabricator.wikimedia.org/F35103737>

TASK DETAIL
  https://phabricator.wikimedia.org/T272088

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: maynorc, So9q
Cc: So9q, maynorc, AntiCompositeNumber, CONFIQ, Xqt, Aklapper, Inductiveload, 
pywikibot-bugs-list, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, 
Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, 
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org
To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org

Reply via email to